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)

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 ***

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Create a new report for Bug 8250 on Developer Community or GitHub if you have new information to add and do not yet see a matching report.

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Related Links: