小问题:关于Math类中的IEEEremainder(arg1,arg2)函数

MashiMaro2002 2003-10-17 11:40:36
Math类中的IEEEremainder(arg1,arg2)函数到底是进行什么运算,比如arg1=9.0,arg2=5.0时结果为-1.0;而arg1=9.0,arg2=1.5时结果为0.0;
arg1=9.0,arg2=6.0时结果又为-3.0;... ...
这个函数到底在对参数进行什么运算?
...全文
210 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
LoveRose 2003-10-17
  • 打赏
  • 举报
回复
public static double IEEEremainder(double f1,double f2)
Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard. The remainder value is mathematically equal to f1 - f2 × n, where n is the mathematical integer closest to the exact mathematical value of the quotient f1/f2, and if two mathematical integers are equally close to f1/f2, then n is the integer that is even. If the remainder is zero, its sign is the same as the sign of the first argument. Special cases:
If either argument is NaN, or the first argument is infinite, or the second argument is positive zero or negative zero, then the result is NaN.
If the first argument is finite and the second argument is infinite, then the result is the same as the first argument.

Parameters:
f1 - the dividend.
f2 - the divisor.

Returns:
the remainder when f1 is divided by f2.

62,612

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧