626 * the result is NaN.
627 * </ul>
628 *
629 * <li>If both arguments are integers, then the result is exactly equal
630 * to the mathematical result of raising the first argument to the power
631 * of the second argument if that result can in fact be represented
632 * exactly as a {@code double} value.</ul>
633 *
634 * <p>(In the foregoing descriptions, a floating-point value is
635 * considered to be an integer if and only if it is finite and a
636 * fixed point of the method {@link #ceil ceil} or,
637 * equivalently, a fixed point of the method {@link #floor
638 * floor}. A value is a fixed point of a one-argument
639 * method if and only if the result of applying the method to the
640 * value is equal to the value.)
641 *
642 * @param a base.
643 * @param b the exponent.
644 * @return the value {@code a}<sup>{@code b}</sup>.
645 */
646 public static native double pow(double a, double b);
647
648 /**
649 * Returns the closest {@code int} to the argument, with ties
650 * rounding to positive infinity.
651 *
652 * <p>Special cases:
653 * <ul><li>If the argument is NaN, the result is 0.
654 * <li>If the argument is negative infinity or any value less than or
655 * equal to the value of {@code Integer.MIN_VALUE}, the result is
656 * equal to the value of {@code Integer.MIN_VALUE}.
657 * <li>If the argument is positive infinity or any value greater than or
658 * equal to the value of {@code Integer.MAX_VALUE}, the result is
659 * equal to the value of {@code Integer.MAX_VALUE}.</ul>
660 *
661 * @param a a floating-point value to be rounded to an integer.
662 * @return the value of the argument rounded to the nearest
663 * {@code int} value.
664 * @see java.lang.Integer#MAX_VALUE
665 * @see java.lang.Integer#MIN_VALUE
666 */
|
626 * the result is NaN.
627 * </ul>
628 *
629 * <li>If both arguments are integers, then the result is exactly equal
630 * to the mathematical result of raising the first argument to the power
631 * of the second argument if that result can in fact be represented
632 * exactly as a {@code double} value.</ul>
633 *
634 * <p>(In the foregoing descriptions, a floating-point value is
635 * considered to be an integer if and only if it is finite and a
636 * fixed point of the method {@link #ceil ceil} or,
637 * equivalently, a fixed point of the method {@link #floor
638 * floor}. A value is a fixed point of a one-argument
639 * method if and only if the result of applying the method to the
640 * value is equal to the value.)
641 *
642 * @param a base.
643 * @param b the exponent.
644 * @return the value {@code a}<sup>{@code b}</sup>.
645 */
646 public static double pow(double a, double b) {
647 return FdLibm.Pow.pow(a, b);
648 }
649
650 /**
651 * Returns the closest {@code int} to the argument, with ties
652 * rounding to positive infinity.
653 *
654 * <p>Special cases:
655 * <ul><li>If the argument is NaN, the result is 0.
656 * <li>If the argument is negative infinity or any value less than or
657 * equal to the value of {@code Integer.MIN_VALUE}, the result is
658 * equal to the value of {@code Integer.MIN_VALUE}.
659 * <li>If the argument is positive infinity or any value greater than or
660 * equal to the value of {@code Integer.MAX_VALUE}, the result is
661 * equal to the value of {@code Integer.MAX_VALUE}.</ul>
662 *
663 * @param a a floating-point value to be rounded to an integer.
664 * @return the value of the argument rounded to the nearest
665 * {@code int} value.
666 * @see java.lang.Integer#MAX_VALUE
667 * @see java.lang.Integer#MIN_VALUE
668 */
|