JDK-8134780 : Port fdlibm to Java, part 1
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Other
  • Submitted: 2015-08-31
  • Updated: 2018-10-23
  • Resolved: 2016-12-18
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Sub Tasks
JDK-7130085 :  
JDK-8134795 :  
JDK-8136799 :  
JDK-8139688 :  
The java.lang.StrictMath libraries require use of the FDLIBM algorithms for some methods:

* sin, cos, tan
* asin, acos, atan
* sinh, cosh, tanh
* log, exp, log10
* cbrt
* atan2
* pow
* hypot
* expm1, log1p

These algorithms are implemented in C and it would be advantageous to implement them in Java instead.
The port to fdlibm is partially done under JDK 9; the remainder will be done in a future release under JDK-8171407.

FC Extension Request The remaining work is to apply the same techniques which have already been successfully used to port the FDLIBM pow, hypot, and cbrt functions to exp, log, sin, cos, etc. The ported functions have much better performance (no Java <-> JNI transitions) and will remove the need to maintain a particularly troublesome piece of native code (JDK-4294714, JDK-8074816, etc.). Therefore, I judge this effort to be low risk and able to be completed by August 15, 2016 (work is expected to proceed function by function interspersed with other work).

Can we do fmod as well? See JDK-8015396 and JDK-8145543.

Nice! I didn't know you are actively working on this. Right now there is no Fix Version. Any chance to get this into 9?