United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4851625 : Add hyperbolic transcendental functions (sinh, cosh, tanh) to Java math library

Details
Type:
Enhancement
Submit Date:
2003-04-21
Status:
Resolved
Updated Date:
2003-08-01
Project Name:
JDK
Resolved Date:
2003-08-01
Component:
core-libs
OS:
generic
Sub-Component:
java.lang
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
5.0
Fixed Versions:
5.0 (tiger)

Related Reports
Duplicate:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

Description
Java's math libraries lack the transcendental elementary functions sinh, cosh, and tanh; these should be added to the math library.

The listed methods are part of Tiger-feature 4633024.

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger

FIXED IN:
tiger

INTEGRATED IN:
tiger
tiger-b14


                                     
2004-06-14
SUGGESTED FIX

src/share/native/java/lang/fdlibm/include>sccs sccsdiff -r1.10 -r1.11 jfdlibm.h
------- jfdlibm.h -------
41a42,44
> #define hypot   jhypot
> #define log1p   jlog1p
> #define expm1   jexpm1
75a79,80
> #define __ieee754_log1p         __j__ieee754_log1p
> #define __ieee754_expm1         __j__ieee754_expm1


src/share/native/java/lang>sccs sccsdiff -r1.53 -r1.54 StrictMath.c

------- StrictMath.c -------
109a110,148
> 
> JNIEXPORT jdouble JNICALL
> Java_java_lang_StrictMath_cosh(JNIEnv *env, jclass unused, jdouble d)
> {
>     return (jdouble) jcosh((double)d);
> }
> 
> JNIEXPORT jdouble JNICALL
> Java_java_lang_StrictMath_sinh(JNIEnv *env, jclass unused, jdouble d)
> {
>     return (jdouble) jsinh((double)d);
> }
> 
> JNIEXPORT jdouble JNICALL
> Java_java_lang_StrictMath_tanh(JNIEnv *env, jclass unused, jdouble d)
> {
>     return (jdouble) jtanh((double)d);
> }
> 
> JNIEXPORT jdouble JNICALL
> Java_java_lang_StrictMath_hypot(JNIEnv *env, jclass unused, jdouble x, jdouble y)
> {
>     return (jdouble) jhypot((double)x, (double)y);
> }
> 
> 
> 
> JNIEXPORT jdouble JNICALL
> Java_java_lang_StrictMath_log1p(JNIEnv *env, jclass unused, jdouble d)
> {
>     return (jdouble) jlog1p((double)d);
> }
> 
> JNIEXPORT jdouble JNICALL
> Java_java_lang_StrictMath_expm1(JNIEnv *env, jclass unused, jdouble d)
> {
>     return (jdouble) jexpm1((double)d);
> }
> 


make/java/java>sccs sccsdiff -r1.53 -r1.54 mapfile-vers

------- mapfile-vers -------
147a148,153
>               Java_java_lang_StrictMath_cosh;
>               Java_java_lang_StrictMath_sinh;
>               Java_java_lang_StrictMath_tanh;
>               Java_java_lang_StrictMath_hypot;
>               Java_java_lang_StrictMath_log1p;
>               Java_java_lang_StrictMath_expm1;


Changes java.lang.Math and java.lang.StrictMath are adding JavaDoc for the methods and Math forwarding to StrictMath forwarding to the native fdlibm implementation.

###@###.### 2003-07-23
                                     
2003-07-23
EVALUATION

A fine idea.

###@###.### 2003-04-21
                                     
2003-04-21



Hardware and Software, Engineered to Work Together