⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vmmath.java

📁 linux下建立JAVA虚拟机的源码KAFFE
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
   * <li>If the first argument is negative zero and the second argument is a   * negative finite odd integer, or the first argument is negative infinity   * and the second argument is a positive finite odd integer, then the result   * is negative infinity.</li>   * <li>If the first argument is less than zero and the second argument is a   * finite even integer, then the result is equal to the result of raising   * the absolute value of the first argument to the power of the second   * argument.</li>   * <li>If the first argument is less than zero and the second argument is a   * finite odd integer, then the result is equal to the negative of the   * result of raising the absolute value of the first argument to the power   * of the second argument.</li>   * <li>If the first argument is finite and less than zero and the second   * argument is finite and not an integer, then the result is NaN.</li>   * <li>If both arguments are integers, then the result is exactly equal to   * the mathematical result of raising the first argument to the power of   * the second argument if that result can in fact be represented exactly as   * a double value.</li>   *   * </ul><p>(In the foregoing descriptions, a floating-point value is   * considered to be an integer if and only if it is a fixed point of the   * method {@link #ceil(double)} or, equivalently, a fixed point of the   * method {@link #floor(double)}. A value is a fixed point of a one-argument   * method if and only if the result of applying the method to the value is   * equal to the value.) This is accurate within 1 ulp, and is semi-monotonic.   *   * @param a the number to raise   * @param b the power to raise it to   * @return a<sup>b</sup>   */  public static native double pow(double a, double b);  /**   * Get the IEEE 754 floating point remainder on two numbers. This is the   * value of <code>x - y * <em>n</em></code>, where <em>n</em> is the closest   * double to <code>x / y</code> (ties go to the even n); for a zero   * remainder, the sign is that of <code>x</code>. If either argument is NaN,   * the first argument is infinite, or the second argument is zero, the result   * is NaN; if x is finite but y is infinite, the result is x. This is   * accurate within the limits of doubles.   *   * @param x the dividend (the top half)   * @param y the divisor (the bottom half)   * @return the IEEE 754-defined floating point remainder of x/y   * @see #rint(double)   */  public static native double IEEEremainder(double x, double y);  /**   * Take the nearest integer that is that is greater than or equal to the   * argument. If the argument is NaN, infinite, or zero, the result is the   * same; if the argument is between -1 and 0, the result is negative zero.   * Note that <code>Math.ceil(x) == -Math.floor(-x)</code>.   *   * @param a the value to act upon   * @return the nearest integer &gt;= <code>a</code>   */  public static native double ceil(double a);  /**   * Take the nearest integer that is that is less than or equal to the   * argument. If the argument is NaN, infinite, or zero, the result is the   * same. Note that <code>Math.ceil(x) == -Math.floor(-x)</code>.   *   * @param a the value to act upon   * @return the nearest integer &lt;= <code>a</code>   */  public static native double floor(double a);  /**   * Take the nearest integer to the argument.  If it is exactly between   * two integers, the even integer is taken. If the argument is NaN,   * infinite, or zero, the result is the same.   *   * @param a the value to act upon   * @return the nearest integer to <code>a</code>   */  public static native double rint(double a);  /**   * <p>   * Take a cube root. If the argument is NaN, an infinity or zero, then   * the original value is returned.  The returned result must be within 1 ulp   * of the exact result.  For a finite value, <code>x</code>, the cube root   * of <code>-x</code> is equal to the negation of the cube root   * of <code>x</code>.    * </p>   * <p>   * For a square root, use <code>sqrt</code>.  For other roots, use   * <code>pow(a, 1 / rootNumber)</code>.   * </p>   *   * @param a the numeric argument   * @return the cube root of the argument   * @see #sqrt(double)   * @see #pow(double, double)   */  public static native double cbrt(double a);  /**   * <p>   * Returns the hyperbolic cosine of the given value.  For a value,   * <code>x</code>, the hyperbolic cosine is <code>(e<sup>x</sup> +    * e<sup>-x</sup>)/2</code>   * with <code>e</code> being <a href="#E">Euler's number</a>.  The returned   * result must be within 2.5 ulps of the exact result.   * </p>   * <p>   * If the supplied value is <code>NaN</code>, then the original value is   * returned.  For either infinity, positive infinity is returned.   * The hyperbolic cosine of zero must be 1.0.   * </p>   *    * @param a the numeric argument   * @return the hyperbolic cosine of <code>a</code>.   * @since 1.5   */  public static native double cosh(double a);  /**   * <p>   * Returns <code>e<sup>a</sup> - 1.  For values close to 0, the   * result of <code>expm1(a) + 1</code> tend to be much closer to the   * exact result than simply <code>exp(x)</code>.  The result must be within   * 1 ulp of the exact result, and results must be semi-monotonic.  For finite   * inputs, the returned value must be greater than or equal to -1.0.  Once   * a result enters within half a ulp of this limit, the limit is returned.   * </p>      * <p>   * For <code>NaN</code>, positive infinity and zero, the original value   * is returned.  Negative infinity returns a result of -1.0 (the limit).   * </p>   *    * @param a the numeric argument   * @return <code>e<sup>a</sup> - 1</code>   * @since 1.5   */  public static native double expm1(double a);  /**   * <p>   * Returns the hypotenuse, <code>a<sup>2</sup> + b<sup>2</sup></code>,   * without intermediate overflow or underflow.  The returned result must be   * within 1 ulp of the exact result.  If one parameter is held constant,   * then the result in the other parameter must be semi-monotonic.   * </p>   * <p>   * If either of the arguments is an infinity, then the returned result   * is positive infinity.  Otherwise, if either argument is <code>NaN</code>,   * then <code>NaN</code> is returned.   * </p>   *    * @param a the first parameter.   * @param b the second parameter.   * @return the hypotenuse matching the supplied parameters.   * @since 1.5   */  public static native double hypot(double a, double b);  /**   * <p>   * Returns the base 10 logarithm of the supplied value.  The returned   * result must within 1 ulp of the exact result, and the results must be   * semi-monotonic.   * </p>   * <p>   * Arguments of either <code>NaN</code> or less than zero return   * <code>NaN</code>.  An argument of positive infinity returns positive   * infinity.  Negative infinity is returned if either positive or negative   * zero is supplied.  Where the argument is the result of   * <code>10<sup>n</sup</code>, then <code>n</code> is returned.   * </p>   *   * @param a the numeric argument.   * @return the base 10 logarithm of <code>a</code>.   * @since 1.5   */  public static native double log10(double a);  /**   * <p>   * Returns the natural logarithm resulting from the sum of the argument,   * <code>a</code> and 1.  For values close to 0, the   * result of <code>log1p(a)</code> tend to be much closer to the   * exact result than simply <code>log(1.0+a)</code>.  The returned   * result must be within 1 ulp of the exact result, and the results must be   * semi-monotonic.   * </p>   * <p>   * Arguments of either <code>NaN</code> or less than -1 return   * <code>NaN</code>.  An argument of positive infinity or zero   * returns the original argument.  Negative infinity is returned from an   * argument of -1.   * </p>   *   * @param a the numeric argument.   * @return the natural logarithm of <code>a</code> + 1.   * @since 1.5   */  public static native double log1p(double a);  /**   * <p>   * Returns the hyperbolic sine of the given value.  For a value,   * <code>x</code>, the hyperbolic sine is <code>(e<sup>x</sup> -    * e<sup>-x</sup>)/2</code>   * with <code>e</code> being <a href="#E">Euler's number</a>.  The returned   * result must be within 2.5 ulps of the exact result.   * </p>   * <p>   * If the supplied value is <code>NaN</code>, an infinity or a zero, then the   * original value is returned.   * </p>   *    * @param a the numeric argument   * @return the hyperbolic sine of <code>a</code>.   * @since 1.5   */  public static native double sinh(double a);  /**   * <p>   * Returns the hyperbolic tangent of the given value.  For a value,   * <code>x</code>, the hyperbolic tangent is <code>(e<sup>x</sup> -    * e<sup>-x</sup>)/(e<sup>x</sup> + e<sup>-x</sup>)</code>   * (i.e. <code>sinh(a)/cosh(a)</code>)   * with <code>e</code> being <a href="#E">Euler's number</a>.  The returned   * result must be within 2.5 ulps of the exact result.  The absolute value   * of the exact result is always less than 1.  Computed results are thus   * less than or equal to 1 for finite arguments, with results within   * half a ulp of either positive or negative 1 returning the appropriate   * limit value (i.e. as if the argument was an infinity).   * </p>   * <p>   * If the supplied value is <code>NaN</code> or zero, then the original   * value is returned.  Positive infinity returns +1.0 and negative infinity   * returns -1.0.   * </p>   *    * @param a the numeric argument   * @return the hyperbolic tangent of <code>a</code>.   * @since 1.5   */  public static native double tanh(double a);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -