[Mono-list] Mono and .Net Floating Point Inconsistencies
ddambro at gmail.com
Tue Jan 13 17:29:29 EST 2009
> ddambro wrote:
>> I have a floating point heavy simulation written in C# that I am
>> interested in running in Linux. The simulator runs fine in mono, but
>> I've noticed that when I take the same binary and run it with the same
>> inputs it produces different outputs if it is run on mono and .Net. From
>> I can tell, these inconsistencies are the result of slight differences in
>> the floating point calculations. It is important to my experiments that
>> an arbitrary machine (running .Net or mono) can reproduce the same
>> results as another arbitrary machine. Thus, I am curious as to if this
>> is a known issue and if there is any way to force .Net and mono to
>> produce the same output with respect to floating point calculations.
> Provide a simple test case so other people can test it and try to find
> whats causing this.
Unfortunately, the program in question is fairly large, complex, and
multi-threaded, so it's difficult to pinpoint the exact section of code
where the two begin to diverge. I'll keep looking and will certainly post
an example if I find one. For now though, are there any known conditions
that cause these inconsistencies? I make use of many functions in
System.Math, and do some double to float casting, could either of these lead
to my problems?
View this message in context: http://www.nabble.com/Mono-and-.Net-Floating-Point-Inconsistencies-tp21428695p21445881.html
Sent from the Mono - General mailing list archive at Nabble.com.
More information about the Mono-list