JDK 8 code review request for 7075098: Remove unused fdlibm files

Joe Darcy joe.darcy at oracle.com
Thu Aug 4 20:09:45 UTC 2011


Hi Mike.

Mike Duigou wrote:
> Looks good to me. 
>
> I did wonder if we have a policy for tracking fdlibm updates. 

To a first approximation (and even a second approximation), fdlibm 
doesn't have updates any more any hasn't for many years.  The changes in 
in 5.3 were to fix a few bugs I and others had discovered circa 2004. [1]

> The fdlibm people don't seem to ascribe dates to their releases or think to include version numbers in their headers. Are we using 5.3, the apparent latest version? 

Yes, as specified in java.lang.StrictMath, we are using 5.3 which is the 
latest version.  The upstream master copy of FDLIBM is no longer being 
actively maintained so I don't expect any versions after 5.3 any time soon.

> Their release page mentions an outstanding incorrect code generation bug due to non-standards compliant code. Is our usage vulnerable to this bug? Do we have a test to catch this bug should it be encountered?
>   

The JDK makefiles specially compile the FDLIBM sources under lower 
optimization levels to try to avoid such problems.  Over the years, we 
have had our share of C compiler bugs tripping up FDLIBM, which have 
been caught by our testing.  One of my long-term goals is to finish the 
small matter of programming [2] to port FDLIBM from C to Java, which 
would immunize the JDK from this class of problem.

Thanks for the review,

-Joe

[1] http://blogs.oracle.com/darcy/entry/finding_a_bug_in_fdlibm

[2] A piece of the SMOP:
6908131: Pure Java implementations of StrictMath.floor(double) & 
StrictMath.ceil(double)
http://hg.openjdk.java.net/jdk7/tl/jdk/rev/ad1e30930c6c

> Mike
>
> On Aug 4 2011, at 11:56 , Joe Darcy wrote:
>
>   
>> Hello.
>>
>> Please review these straightforward changes for
>>
>>   7075098: Remove unused fdlibm files
>>   http://cr.openjdk.java.net/~darcy/7075098.0/
>>
>> The JDK math libraries in java.lang.{Math, StrictMath} do not expose all the functionality implemented in the embedded copy of FDLIBM (freely distributable math library).  Since we do not plan do expose the remaining functionality (erf, gamma, lgama, j0, j1, jn, acosh, asinh, etc.) and these functions are not needed by the Java core libs directly or by transitivity, this changeset removes the unneeded files from the build.
>>
>> On my Linux build, with this change the size of the compiled fdlibm library file went down from 234,372 to 165,750 and all the math library regression tests pass.
>>
>> Thanks,
>>
>> -Joe
>>     
>
>   




More information about the core-libs-dev mailing list