|
Since the precision significant digits for the equation has no decimals should the answer (rounded) not be 142?
At the most 141.7419 should be the answer.
[Edit]remembered correct phrase[/edit]
|
|
|
|
|
|
LOL! I found this a long time ago and had no one to share it with. You are the lucky ones.
|
|
|
|
|
That's the 14th decimal place? Close enough.
Are you trying to plot the position of a particle on the other side of the galaxy or something?
|
|
|
|
|
using this code:
decimal value = (54M / 31M) + 140M; , you get this answer (every time): 141.74193548387096774193548387
---------------------------
using this code:
double value = (54d / 31d) + 140d; , you get this answer (most of the time): 141.74193548387098
---------------------------
using this code:
double value = (54 / 31) + 140; , you get this answer (every time): 141.0
---------------------------
What's your point? All of your examples are wrong because you're using floating point math.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Mr. Dale Carnegie's first rule of Winning Friends & Influencing People is "Never tell a person they are wrong."
Also, there is no Decimal type in JavaScript and my original runs in JavaScript. Nor is there any double type.
Well, not really.
Also, did you run the JavaScript sample in IE? Then you would've gotten the udder answer.
Also, I have not point. It was just math for fun.
thx.
|
|
|
|
|
I don't really care about what types are/are not available in Javascript. The simple fact of the matter is that it's using floating point math to do it, and you're never going to be absolutley sure about what you're gonna get back for the last digit because of that fact.
And what the hell is wrong with you? Math is NOT fun. I've been doing trig in code for the last week or so, and I kinda hate it.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
John Simmons / outlaw programmer wrote: And what the hell is wrong with you? Math is NOT fun.
Agree with you there. I bet the wizards come out and bash their math clubs upon our noggin's now.
|
|
|
|
|
John Simmons / outlaw programmer wrote: Math is NOT fun.
Those are fighting words.
[Picard voice] To each his own, #1.
|
|
|
|
|
The real head-spinner for me is that all of the browsers could (and hopefully should) have calculated exactly the same value.
The 'bug' could be in the converting to decimal for displaying.
|
|
|
|
|
Right. That was really my point. Everyone (browser) should at least be on the same page on how to display the final value.
Thanks for noticing.
|
|
|
|
|
Amazing twitter grammar fails[^]
Nothing like hyping up what might bring a smile to your face but nor much more, though you do wonder at modern education. Or is everyone just stoopid?
"If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." Red Adair.
Those who seek perfection will only find imperfection
nils illegitimus carborundum
me, me, me
me, in pictures
|
|
|
|
|
Well, I is.
But I'm not on Twatter.
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
|
My current favorite is from Tony Abbott (Prime Minister of Australia): Quote: "No one -- however smart, however well-educated, however experienced -- is the suppository of all wisdom. - Tony Abbott"
Source Link [^]
|
|
|
|
|
The BNP Youth Leader is currently being mocked in various online publications for a Facebook rant against his gay dog challenging his principles so I googled his name to find out a little more about him, one hit took me to the BNPs official online TV channel where they have footage of him delivering a speech at the age of 17. The text that accocompanies the video is;
Quote: One of many speakers at a recent demonstration in Blackpool was 17 year old Jack Renshaw who delivers a very well wrote out speech regarding society and the family unit.
Some men are born mediocre, some men achieve mediocrity, and some men have mediocrity thrust upon them.
|
|
|
|
|
I had to read this twice. Then re-open the link and read it again before I could quite believe it.
Alberto Brandolini: The amount of energy necessary to refute bullshit is an order of magnitude bigger than to produce it.
|
|
|
|
|
|
Just tried it and it looks like it's working for me. The value you give is for 206^(1/3) which suggests you forgot an equals or a bracket.
One day I aspire to having a signature.
|
|
|
|
|
as the Viper said. press last ")" and I get 5.9 etc and then "=" it's 73.8 and stuff.
|
|
|
|
|
It works for me too - the way to get your "wrong" result is to forget the final "="
206 ^ (1 / 3) == 5.90594
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
When you hit ) Calculator computes the value inside the brackets you just closed - you have to hit = (enter) to calculate all the equation...
I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is. (V)
|
|
|
|
|
This is why I always preferred slide rules - you have to have an idea what result you are going to get, rather than taking the presented number as assuming it's right (or wrong). Well, that and we weren't allowed to use them in exams (if we could afford them: a Sinclair four function jobbie cost £80[^] - about the same as about 600 pints of beer! )
Then I got a programmable calculator, and haven't looked back...
Those who fail to learn history are doomed to repeat it. --- George Santayana (December 16, 1863 – September 26, 1952)
Those who fail to clear history are doomed to explain it. --- OriginalGriff (February 24, 1959 – ∞)
|
|
|
|
|
OriginalGriff wrote: Then I got a programmable calculator, and haven't looked back up...
ftfy
|
|
|
|
|
My Dad used a Slide Rule for years after calculators came in, borrow a colleagues Commodore job and went and bought his own in the lunch hour!
|
|
|
|