|
Yeah, well, the same worthy tome also says:-
This gives 15–17 significant decimal digits precision.
Right here![^]
|
|
|
|
|
Merely guidelines.[^]
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
What is "\ in Windows"? VB's truncating division?
|
|
|
|
|
Yup - this is an old hobby project originally written in HP Basic for the HP95, and morphed through various hardware incarnations over the years, so yes, it is the VB integer division sign, although I first used it in good ol' Fartran, sorry, Fortran.
|
|
|
|
|
Well, I don't get it. While there are differences between truncating division and division followed by floor, none of them seem like an immediately obvious culprit. Then, without context it's hard to tell.
- VB's \ will first round its inputs to integers, then divide them with truncation. The initial rounding makes it different, and it will do weird things if the input is outside of the range of an integer, but then you would have a total BS result and you don't.
- division-followed-by-floor means the division first rounds (not to an integer, but to the nearest double) and then it goes down instead of towards zero (so for negative results it's usually different by 1).
And then there's the usual "floating point stuff that runs on x86 will probably use x87 and its weird 80bit floats" thing that likes to mess things up unpredictably.
|
|
|
|
|
You could still watch C-beams glitter in the dark near the Tannhäuser Gate.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Now, you would not be an android that dreams of electronic sheep?
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
All those moments will be lost, in time. Like tears, in the rain.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
You should listen to the rhythm of the falling rain...
(a quick change of subject and genre)
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
If you really want an answer you should provide more information which will make it then a programming question.
When performing complex calculations, small differences can accumulate. You might check all interim values to know where it happens.
A possible reason might be that x86 math operations using the math coprocessor (AKA x87) are performing all operations internally with their 10 byte format and convert the result to single or double precision with proper rounding upon storing to a variable in memory.
The floating point units of other CPUs - and the vector units of x86 CPUs - are using only single or double precision where the result of operations are not rounded.
|
|
|
|
|
To be honest, I am not really surprised at the difference. It represents less than 100 milliseconds over a century, and as I am only interested in half a second per day, it is irrelevant.
I may bother to track it down sometime, but since the process goes through well over 100 trig functions, all with a multiplier 'inside and outside' as it were, which are subtracted and/or added to each other, through multiple iterations, it would take more time than it's worth.
|
|
|
|
|
Half a second per day can become quite much while time goes by
|
|
|
|
|
True, but my half-second-per-day only relates only to UTC for the particular day in question.
The referenced calculation is a step in the determination the rotation of the foci of the earth's orbit against the background stars - not a lot!
|
|
|
|
|
Then you might have the explanation as also said below by Harold:
The x87 has build-in trigonometric functions (with proper rounding as already noted) while libraries are used with CPUs that did not have these built-in.
|
|
|
|
|
If you have trig in there that's probably it, the precision of those things varies wildly between different implementations.
|
|
|
|
|
Concentration camping on the loch (10)
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
camping = in tent
loch = ness
Concentration = Intentness
We can’t stop here, this is bat country - Hunter S Thompson RIP
modified 19-Dec-16 4:32am.
|
|
|
|
|
You are up tomorrow - care to explain for the beginners?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Movie Quote Of The Day
Quote: I'll be there for you.
The Captain said I had to.
Which movie?
|
|
|
|
|
This isn't the movie you're looking for...
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
Star Trek Wars IX: Captain Corelli's Mandolin vs The Borg (the Musical)
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
What instrument The Borg playing on? The Hammer[^]?
Skipper: We'll fix it.
Alex: Fix it? How you gonna fix this?
Skipper: Grit, spit and a whole lotta duct tape.
|
|
|
|
|
The Clarinet[^] of course!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
You guys are the first to worry about the Borgs' instruments.
The language is JavaScript. that of Mordor, which I will not utter here
This is Javascript. If you put big wheels and a racing stripe on a golf cart, it's still a f***ing golf cart.
"I don't know, extraterrestrial?"
"You mean like from space?"
"No, from Canada."
If software development were a circus, we would all be the clowns.
|
|
|
|
|
Instead of worrying about Borg instruments, worry about the Trumpet in general
|
|
|
|