/openbsd-current/lib/libc/stdlib/ |
H A D | imaxdiv.c | 37 imaxdiv(intmax_t num, intmax_t denom) argument 43 r.quot = num / denom; 44 r.rem = num % denom; 47 r.rem -= denom;
|
H A D | ldiv.c | 37 ldiv(long num, long denom) argument 43 r.quot = num / denom; 44 r.rem = num % denom; 47 r.rem -= denom;
|
H A D | lldiv.c | 37 lldiv(long long num, long long denom) argument 43 r.quot = num / denom; 44 r.rem = num % denom; 47 r.rem -= denom;
|
H A D | div.c | 37 div(int num, int denom) argument 41 r.quot = num / denom; 42 r.rem = num % denom; 52 * r.rem will have the same sign as denom and the opposite 58 * If both are num and denom are positive, r will always 64 * subtract denom from r.rem. 68 r.rem -= denom;
|
/openbsd-current/games/random/ |
H A D | random.c | 169 double denom; local 195 denom = 2; 199 denom = strtod(*argv, &ep); 202 if (denom < 1 || *ep != '\0') 209 /* Return a random exit status between 0 and min(denom - 1, 255). */ 211 if (denom > 256) 212 denom = 256; 214 return arc4random_uniform(denom); 226 * We find a random number between 0 and 1 and, if it's < 1 / denom, 229 selected = random_real() < 1 / denom; [all...] |
/openbsd-current/gnu/usr.bin/gcc/gcc/testsuite/gcc.c-torture/execute/ |
H A D | divconst-2.c | 16 std_eqn (long num, long denom, long quot, long rem) argument 18 /* For completeness, a check for "ABS (rem) < ABS (denom)" belongs here,
|
/openbsd-current/gnu/llvm/compiler-rt/lib/builtins/ppc/ |
H A D | divtc3.c | 42 const long double denom = local 49 DD real = {.ld = __gcc_qdiv(realNumerator, denom)}; 50 DD imag = {.ld = __gcc_qdiv(imagNumerator, denom)}; 60 DD rDD = {.ld = denom};
|
/openbsd-current/gnu/llvm/libcxx/src/ |
H A D | chrono.cpp | 184 // mach_absolute_time() * MachInfo.numer / MachInfo.denom is the number of 185 // nanoseconds since the computer booted up. MachInfo.numer and MachInfo.denom 189 // MachInfo.numer / MachInfo.denom is often 1 on the latest equipment. Specialize 198 return static_cast<double>(MachInfo.numer) / MachInfo.denom; 211 if (MachInfo.numer == MachInfo.denom)
|
/openbsd-current/gnu/llvm/clang/lib/StaticAnalyzer/Checkers/ |
H A D | MallocOverflowSecurityChecker.cpp | 194 const Expr *denom = BOp->getRHS()->IgnoreParenImpCasts(); local 196 if (denom->EvaluateAsInt(Result, Context)) {
|
/openbsd-current/sys/arch/hppa/hppa/ |
H A D | machdep.c | 654 u_int num, denom, delta, mdelta; local 657 for (denom = 1; denom < 1000; denom++) { 658 num = (PAGE0->mem_10msec * denom) / 10000; 659 delta = num * 10000 / denom - PAGE0->mem_10msec; 661 cpu_ticksdenom = denom; 665 cpu_ticksdenom = denom;
|
/openbsd-current/sys/kern/ |
H A D | kern_clockintr.c | 422 uint32_t denom) 426 KASSERT(numer < denom); 431 cl->cl_expiration = period / denom * numer; 421 clockintr_stagger(struct clockintr *cl, uint64_t period, uint32_t numer, uint32_t denom) argument
|
/openbsd-current/sys/dev/pci/drm/amd/display/dc/dcn30/ |
H A D | dcn30_hwseq.c | 785 unsigned int denom = refresh_hz * 6528; local 789 (100LL + dc->debug.mall_additional_timer_percent) + denom - 1), 790 denom) - 64LL; 811 denom *= 2; 813 (100LL + dc->debug.mall_additional_timer_percent) + denom - 1), 814 denom) - 64LL;
|
/openbsd-current/gnu/gcc/gcc/ |
H A D | libgcc2.c | 1891 MTYPE denom, ratio, x, y; 1900 denom = (c * ratio) + d; 1901 x = ((a * ratio) + b) / denom; 1902 y = ((b * ratio) - a) / denom; 1907 denom = (d * ratio) + c; 1908 x = ((b * ratio) + a) / denom; 1909 y = (b - (a * ratio)) / denom; 1863 MTYPE denom, ratio, x, y; variable
|
/openbsd-current/gnu/usr.bin/perl/dist/Time-HiRes/ |
H A D | HiRes.xs | 713 if (darwin_time_init() && timebase_info.denom) { 719 (uint64_t)timebase_info.numer) / (uint64_t)timebase_info.denom; 729 (uint64_t)timebase_info.numer) / (uint64_t)timebase_info.denom; 750 if (darwin_time_init() && timebase_info.denom) { 755 /* In newer kernels both the numer and denom are one, 758 ts->tv_nsec = timebase_info.numer / timebase_info.denom;
|
/openbsd-current/gnu/usr.bin/perl/cpan/Math-BigInt/lib/Math/BigInt/ |
H A D | Lib.pm | 831 my $denom = $class -> _mul($class -> _copy($two), $x); # 2 * x(i) 832 my $delta = $class -> _div($numer, $denom); 849 my $denom = $class -> _mul($class -> _copy($two), $x); # 2 * x(i) 850 my $delta = $class -> _div($numer, $denom); 996 my $denom = $class -> _mul($class -> _copy($n), $xpownm1); # n * x(i)^(n-1) 997 my $delta = $class -> _div($numer, $denom); 1002 print "denom = ", $class -> _str($denom), "\n"; 1030 my $denom = $class -> _mul($class -> _copy($n), $xpownm1); # n * x(i)^(n-1) 1034 print "denom [all...] |
/openbsd-current/sys/uvm/ |
H A D | uvm_pmemrange.c | 137 * Computes num/denom and rounds it up to the next power-of-2. 140 * num/denom, with result =~ num/denom. It is meant to be fast and doesn't 148 pow2divide(psize_t num, psize_t denom) argument 152 for (rshift = 0; num > denom; rshift++, denom <<= 1)
|
/openbsd-current/gnu/gcc/gcc/config/h8300/ |
H A D | lib1funcs.asm | 247 ; D high 8 bits of denom 248 ; d low 8 bits of denom
|
/openbsd-current/gnu/usr.bin/gcc/gcc/config/h8300/ |
H A D | lib1funcs.asm | 247 ; D high 8 bits of denom 248 ; d low 8 bits of denom
|
/openbsd-current/gnu/llvm/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_mac.cpp | 540 if (timebase_info.denom == 0) mach_timebase_info(&timebase_info); 541 return (mach_absolute_time() * timebase_info.numer) / timebase_info.denom;
|
/openbsd-current/sys/dev/pci/drm/amd/display/dc/dcn10/ |
H A D | dcn10_hw_sequencer.c | 2035 uint64_t num, denom; local 2055 denom = *denominator; 2060 num <= max_int32 && denom <= max_int32) { 2066 denom_result = div_u64_rem(denom, prime_numbers[i], &denom_remainder); 2069 denom = denom_result; 2074 *denominator = denom;
|
/openbsd-current/gnu/usr.bin/perl/cpan/Math-BigRat/lib/Math/ |
H A D | BigRat.pm | 1353 my $denom = $class -> bzero(); 1355 $denom -> {_n} = $numer -> {_d}; 1358 return ($numer, $denom);
|
/openbsd-current/gnu/usr.bin/perl/cpan/Math-BigInt/lib/Math/ |
H A D | BigInt.pm | 4219 my $denom = $class -> bone(@r); 4220 return $numer, $denom; 4232 my $denom = $class -> bone(@r); 4233 return $numer, $denom;
|
H A D | BigFloat.pm | 4544 my $denom = $class -> bone(); 4545 return $numer, $denom;
|