MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB技术文章 (https://www.labfans.com/bbs/forumdisplay.php?f=25)
-   -   Round, With Tie Breakers, Round Three - Cleve Moler on Mathematics and Computing (https://www.labfans.com/bbs/showthread.php?t=27103)

poster 2021-04-24 17:42

Round, With Tie Breakers, Round Three - Cleve Moler on Mathematics and Computing
 
[IMG]https://blogs.mathworks.com/wp-content/themes/mathworks_1.0/images/placeholder_9.jpg[/IMG]
I recently published [URL="https://blogs.mathworks.com/cleve/2021/02/25/round-with-ties-to-even/"]Round, With Ties to Even[/URL] and followed that with [URL="https://blogs.mathworks.com/cleve/2021/03/02/round-with-tie-breakers-round-two/"]Round Two[/URL]. Then, in an email, Andy Bartlett pointed out that my new round function fails for some large values of x between flintmax/2 and flintmax.

Contents[URL="https://www.labfans.com/bbs/admincp/#a671370a-6f40-4104-b479-e697499dbc7b"]flintmax/2[/URL][URL="https://www.labfans.com/bbs/admincp/#48e9c6a5-0d15-4441-b6d8-f828215f1bb8"]Rounding[/URL][URL="https://www.labfans.com/bbs/admincp/#a7268701-3d97-438d-b0b6-deb553b62de6"]round[/URL][URL="https://www.labfans.com/bbs/admincp/#98e070ea-b963-422b-93c9-4c67d4abb62e"]test[/URL]flintmax/2The quantity f = flintmax/2 is equal to 2^52, which is 1/eps. The help entry for format bank says it is a fixed format for dollars and cents. That's true, but I also like to use it for displaying large flints.

format bank f = flintmax/2f = 4503599627370496.00The



...[URL="https://blogs.mathworks.com/cleve/?p=6792"]read more >>[/URL]

[IMG]http://feeds.feedburner.com/~r/mathworks/moler/~4/-XLQ4nARl1s[/IMG]

[url=http://feedproxy.google.com/~r/mathworks/moler/~3/-XLQ4nARl1s/]More...[/url]


所有时间均为北京时间。现在的时间是 23:15

Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.