Click here to Skip to main content
15,902,492 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Malaysian Airlines have lost another plane Pin
glennPattonWork318-Jul-14 2:00
professionalglennPattonWork318-Jul-14 2:00 
GeneralRe: Malaysian Airlines have lost another plane Pin
JimmyRopes18-Jul-14 2:44
professionalJimmyRopes18-Jul-14 2:44 
GeneralRe: Malaysian Airlines have lost another plane Pin
JimmyRopes18-Jul-14 1:22
professionalJimmyRopes18-Jul-14 1:22 
GeneralAPOD Pin
R. Giskard Reventlov17-Jul-14 5:57
R. Giskard Reventlov17-Jul-14 5:57 
GeneralRe: APOD Pin
glennPattonWork317-Jul-14 6:03
professionalglennPattonWork317-Jul-14 6:03 
GeneralYou wanna see a real calc bug? Pin
newton.saber17-Jul-14 5:42
newton.saber17-Jul-14 5:42 
GeneralRe: You wanna see a real calc bug? Pin
BobJanova17-Jul-14 6:03
BobJanova17-Jul-14 6:03 
GeneralRe: You wanna see a real calc bug? Pin
harold aptroot17-Jul-14 6:10
harold aptroot17-Jul-14 6:10 
That didn't really prove anything yet. I'll do the math though, will report back.

Ok then, the results are in. And guess what: it's IE that's wrong.

(54.0 / 31.0) + 140.0 evaluated with IEEE 754 doubles in Round to Nearest mode (as JavaScript demands, right?) gives exactly:
141.741935483870975076570175588130950927734375 (exact representation of the correct result)
141.74193548387097 (ie)
141.74193548387098 (correct conversion to 17 digits)

That 54/31 seems to give 1.7419354838709677 is really irrelevant, because
0) that's not what it gives. It gives 1.7419354838709677490982130620977841317653656005859375 (exactly).
1) a Number in JS is not a 17-digit decimal string that is manipulated like we learn in elementary school, it's a an IEEE 754 double.

modified 17-Jul-14 12:28pm.

GeneralRe: You wanna see a real calc bug? Pin
newton.saber17-Jul-14 7:13
newton.saber17-Jul-14 7:13 
GeneralRe: You wanna see a real calc bug? Pin
harold aptroot17-Jul-14 7:21
harold aptroot17-Jul-14 7:21 
GeneralRe: You wanna see a real calc bug? Pin
newton.saber17-Jul-14 8:21
newton.saber17-Jul-14 8:21 
GeneralRe: You wanna see a real calc bug? Pin
Corporal Agarn17-Jul-14 6:26
professionalCorporal Agarn17-Jul-14 6:26 
GeneralRe: You wanna see a real calc bug? Pin
Tim Carmichael17-Jul-14 7:16
Tim Carmichael17-Jul-14 7:16 
GeneralRe: You wanna see a real calc bug? Pin
newton.saber17-Jul-14 8:19
newton.saber17-Jul-14 8:19 
GeneralRe: You wanna see a real calc bug? Pin
thrakazog17-Jul-14 7:25
thrakazog17-Jul-14 7:25 
GeneralRe: You wanna see a real calc bug? Pin
#realJSOP17-Jul-14 8:48
professional#realJSOP17-Jul-14 8:48 
GeneralRe: You wanna see a real calc bug? Pin
newton.saber17-Jul-14 9:38
newton.saber17-Jul-14 9:38 
GeneralRe: You wanna see a real calc bug? Pin
#realJSOP17-Jul-14 9:57
professional#realJSOP17-Jul-14 9:57 
GeneralRe: You wanna see a real calc bug? Pin
newton.saber17-Jul-14 10:18
newton.saber17-Jul-14 10:18 
GeneralRe: You wanna see a real calc bug? Pin
Bassam Abdul-Baki18-Jul-14 0:47
professionalBassam Abdul-Baki18-Jul-14 0:47 
GeneralRe: You wanna see a real calc bug? Pin
Fueled By Decaff18-Jul-14 0:37
Fueled By Decaff18-Jul-14 0:37 
GeneralRe: You wanna see a real calc bug? Pin
newton.saber18-Jul-14 2:21
newton.saber18-Jul-14 2:21 
GeneralWell, not amazing, just amusing... Pin
R. Giskard Reventlov17-Jul-14 5:17
R. Giskard Reventlov17-Jul-14 5:17 
GeneralRe: Well, not amazing, just amusing... Pin
OriginalGriff17-Jul-14 5:24
mveOriginalGriff17-Jul-14 5:24 
GeneralRe: Well, not amazing, just amusing... Pin
Nagy Vilmos17-Jul-14 5:27
professionalNagy Vilmos17-Jul-14 5:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.