This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[JAVA] Implement more java.lang.Math builtins.
- From: Andrew Haley <aph at redhat dot com>
- To: Roger Sayle <roger at eyesopen dot com>
- Cc: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Date: Thu, 29 May 2003 13:07:50 +0100
- Subject: [JAVA] Implement more java.lang.Math builtins.
- References: <Pine.LNX.4.44.0305282049570.1162-100000@www.eyesopen.com>
Roger Sayle writes:
>
> The following patch tweaks the gcj front-end to use GCC's built-ins
> for the mathematical functions atan, atan2, exp, log, pow and tan
> in java.lang.Math builtins.
I'm a bit nervous about this. The JLS is quite specific about these
functions and how they are to be computed, whereas (as far as I am
aware) gcc's builtins are not quite so well-defined. The efficiency
argument is compelling, however.
Perhaps we could enable this with a switch; perhaps it doesn't matter.
Comments welcome...
Andrew.