Bug 24808 - Math.Max(0, float.Epsilon) == 0) on device
Summary: Math.Max(0, float.Epsilon) == 0) on device
Status: RESOLVED DUPLICATE of bug 15802
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: XI 8.4.0
Hardware: PC Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2014-11-25 11:29 UTC by daniel.doubleday
Modified: 2014-11-25 11:38 UTC (History)
2 users (show)

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

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.

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.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description daniel.doubleday 2014-11-25 11:29:56 UTC
Really strange problem with Math.Max:

Tested this with iOS8.1.

On the simulator:

  Math.Max(0, float.Epsilon) == 0) => false // expected

On the device:

  Math.Max(0, float.Epsilon) == 0) => true // ooops

It doesn't seem to be a problem with float.Epsilon
since (0 <= float.Epsilon) => true in both environments
Comment 1 daniel.doubleday 2014-11-25 11:31:14 UTC
My test device is a :

iPhone 5 (Model A1429)
OS: 8.1.1 (12B435)
Comment 2 Rolf Bjarne Kvinge [MSFT] 2014-11-25 11:38:42 UTC
Check Platform Notes here: http://msdn.microsoft.com/en-us/library/system.single.epsilon.aspx

"On ARM systems, the value of the Epsilon constant is too small to be detected, so it equates to zero."

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