Bug 17501 - Math.Round (double.MaxValue, 1) results in Infinity
Summary: Math.Round (double.MaxValue, 1) results in Infinity
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: General (show other bugs)
Version: unspecified
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-01-30 02:55 UTC by Atsushi Eno
Modified: 2018-01-24 20:24 UTC (History)
3 users (show)

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


Attachments

Description Atsushi Eno 2014-01-30 02:55:54 UTC
From http://d.hatena.ne.jp/hnw/20140129

double d = Double.MaxValue;
Console.WriteLine(d); // 1.79769313486232E+308
Console.WriteLine(Math.Round(d, 1)); // Infinity

.NET prints 1.79769313486232E+308 but I'm not sure if it is correct.
Comment 1 Ludovic Henry 2018-01-24 20:24:06 UTC
I cannot reproduce with Mono 5.11.0.276 (master/117468d740a). I get the same behavior as on .NET on Windows.

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