Lines Matching defs:scale_factor
532 * 2<sup>{@code scale_factor}</sup> rounded as if performed
558 * @param scale_factor power of 2 used to scale {@code d}
559 * @return {@code d * }2<sup>{@code scale_factor}</sup>
562 public static double scalb(double d, int scale_factor) {
577 * by 2 ^ (scale_factor % n) and then multiplying several
588 * 2^MIN_EXPONENT and then by 2 ^ (scale_factor %
590 * rounding on underflow could occur; e.g. if the scale_factor
613 if(scale_factor < 0) {
614 scale_factor = Math.max(scale_factor, -MAX_SCALE);
619 scale_factor = Math.min(scale_factor, MAX_SCALE);
624 // Calculate (scale_factor % +/-512), 512 = 2^9, using
626 int t = (scale_factor >> 9-1) >>> 32 - 9;
627 exp_adjust = ((scale_factor + t) & (512 -1)) - t;
630 scale_factor -= exp_adjust;
632 while(scale_factor != 0) {
634 scale_factor -= scale_increment;
641 * 2<sup>{@code scale_factor}</sup> rounded as if performed
667 * @param scale_factor power of 2 used to scale {@code f}
668 * @return {@code f * }2<sup>{@code scale_factor}</sup>
671 public static float scalb(float f, int scale_factor) {
680 scale_factor = Math.max(Math.min(scale_factor, MAX_SCALE), -MAX_SCALE);
691 return (float)((double)f*powerOfTwoD(scale_factor));