This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 8250 - Math.Pow() returns incorrect results on ARM build
Summary: Math.Pow() returns incorrect results on ARM build
Status: RESOLVED DUPLICATE of bug 7938
Alias: None
Product: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: unspecified
Hardware: Other Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-11-06 16:45 UTC by XamarinBugzilla.20.jwman
Modified: 2012-11-07 11:07 UTC (History)
3 users (show)

See Also:
Is this bug a regression?: ---
Last known good build:

Simple test program that ouputs results of calling Math.Pow (615 bytes, text/x-csharp)
2012-11-06 16:45 UTC, XamarinBugzilla.20.jwman

Description XamarinBugzilla.20.jwman 2012-11-06 16:45:08 UTC
Created attachment 2872 [details]
Simple test program that ouputs results of calling Math.Pow

Mono Version
Ubuntu 12.04 
Running on BeagleBone platform.

Calling Math.Pow() returns incorrect results, like this:

Math.Pow(10, -5) results.  Expected: 1E-05  Actual: 0.00891799479722977
Math.Pow(10, 5) results.  Expected: 100000  Actual: 0.257413864135742
Math.Pow(2, 4) results.  Expected: 16  Actual: 0.263913869857788
Math.Pow(2, 8) results.  Expected: 256  Actual: 1

This works as expected on the x86 version (Debian
Comment 1 Zoltan Varga 2012-11-07 00:21:31 UTC
Probably a dup of:
Comment 2 XamarinBugzilla.20.jwman 2012-11-07 00:39:24 UTC
Ah.  Yes, it is in fact using hardfp.  Didn't know that caused issues with mono.

I'm sure that's the cause.
Comment 3 Zoltan Varga 2012-11-07 11:07:46 UTC

*** This bug has been marked as a duplicate of bug 7938 ***

Note You need to log in before you can comment on or make changes to this bug.