说实话我也不太清楚不过看看这个也许明白一些,可惜我的英语太差了!_!Unlike some of the numeric functions of class StrictMath, all implementations of the equivalent functions of class Math are not defined to return the bit-for-bit same results. This relaxation permits better-performing implementations where strict reproducibility is not required. By default many of the Math functions simply delegate to the equivalent functions in StrictMath for their implementations. Code generators are encouraged to use platform-specific native libraries or microprocessor instructions, where available, to provide higher-performance implementations of Math functions. Such higher-performance implementations still must conform to the specification for Math. 

解决方案 »

  1.   

    楼主我晚上给你答案,我现在在TMD考该死的Excel,考完了给你答案!
      

  2.   

    JohnSonR(学习ASP和JAVA中) ( ) 信誉:100  2003-11-14 15:32:00  得分:0  __________________________________________________________期待您的答复。Excel还需要考试?同情中... binny(骑个破车看夕阳) ( ) 信誉:98  2003-11-14 15:07:00  得分:0 
     
    -----------------------------------------------------------
    我的英语也不怎么样,说实话,刚才那段话,我已经研究半天了,就是没搞明白。
      

  3.   

    在Math类里面的函数利用计算机浮点单元的例程来达到最快的性能。如果得到完全的可预测的结果,比最快的性能更重要的话,应该使用StrictMath方法。它从“自由分布数学库”(fdlibm)实现其运算法则,这样保证了在所有平台上都可以得到相同的结果。
      

  4.   

    P.S Excel说实话,我还没考出来呢,好在老师说不算分数!我们不是考操作,是考计量经济学和统计学的知识,还有什么线性回归,决策管理模型。我都晕了!
      

  5.   

    谢谢 JohnSonR(学习ASP和JAVA中) ( ) 信誉:100  2003-11-14 15:32:00  得分:0  不过听起来好像很高深的样子啊。
    对于什么“计算机浮点单元的例程”,和“自由分布数学库”(fdlibm),偶一点都没听说过啊。就是说 Math 会出现不同平台下不同结果的情况,但是速度比较快,StrictMath正好相反,是吗?再请问一个问题:
    我测试Math.round() 方法时,round(-1.5)得出结果竟然是-1,为什么不是-2呢?