Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #38402
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2018-06-24 13:31 -0700 |
| References | <pgool7$bru$1@news.albasani.net> <pgor09$19ak$1@gioia.aioe.org> |
| Message-ID | <b4f7eefd-bde4-4b77-9dbf-b417091061ed@googlegroups.com> (permalink) |
| Subject | Re: Has Android different floats? |
| From | bursejan@gmail.com |
You cannot use the strictfp keyword in front
of Math.pow(). Thats only for the basic operations.
Math.pow() itself is implemented in JDK 1.8 as follows:
public static double pow(double a, double b) {
return StrictMath.pow(a, b); // default impl. delegates to StrictMath
}
Am Sonntag, 24. Juni 2018 21:21:57 UTC+2 schrieb Arne Vajhøj:
> On 6/24/2018 2:41 PM, j4n bur53 wrote:
> > Running a simple test.
> > ** is Math.pow(),
> > ^ is BigInteger.pow() and then BigInteger.doubleValue().
> >
> > On Java:
> >
> > ?- between(15,30,N), X is 10**N-10^N, write(N-X), nl, fail; true.
> > 15-0.0
>
> > 23-1.6777216E7
>
> > 29-0.0
> > 30-0.0
> >
> > On Adroid:
> >
> > ?- between(15,30,N), X is 10**N-10^N, write(N-X), nl, fail; true.
> > 15-0.0
>
> > 23-0.0
>
> > 29-1.7592186044416E13
> > 30-0.0
> >
> > Has Android different floats?
> > Tested jdk1.8.0_152 against Android 8.0.0
>
> ARM supposedly use standard IEEE 754 FP.
>
> But I wonder if usage of strictfp would change your results.
>
> Arne
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Has Android different floats? j4n bur53 <janburse@fastmail.fm> - 2018-06-24 20:41 +0200
Re: Has Android different floats? Arne Vajhøj <arne@vajhoej.dk> - 2018-06-24 15:21 -0400
Re: Has Android different floats? bursejan@gmail.com - 2018-06-24 13:31 -0700
Re: Has Android different floats? bursejan@gmail.com - 2018-06-24 13:35 -0700
Re: Has Android different floats? bursejan@gmail.com - 2018-06-24 13:44 -0700
Re: Has Android different floats? Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-06-24 17:28 -0400
Re: Has Android different floats? bursejan@gmail.com - 2018-06-24 16:08 -0700
Re: Has Android different floats? bursejan@gmail.com - 2018-06-26 10:29 -0700
csiph-web