To talk on Icrontic, just register!

It only takes 30 seconds.

Have an account? Sign in:

Forgot?
danball1976
Veteran Icrontian
danball1976
2,634 Posts

Windows Calculator Flaw?

I saw this at the AMDMB forums. A guy made a mention of how if you take 8/9 and then the % key in Windows Calculator will return 0.72, but really should return 88.888888889 and I then took my Casio fx-115MS Scientific Calculator and did the same, it return 88.888888889.

Whats even stranger on the Windows Calculator is that 9/8 and then the % will return 0.72 also, but on my calculator that will return 112.5
__________________
Visit my Deviant Art profile - Visit my Fur Affinity profile
MERRICK
DAW Tech
MERRICK
334 Posts
hey Dan!

I only have win9.x calculators. Is this fact also in the w2k and xp calculator?

Would this happen in a third party calculator?

__________________ Audio Engineer-DAW Tech
Bellsong Recording Studio
Peckers
Icrontic Regular
Peckers
43 Posts
sometimes I get

89/98 % = 87.22

othertimes I get the right result...

on winXP
__________________ Soltek SL-75DRV5 l AMD XP1700+@2422mhz l 512mb DDR333 l Hercules 8500LE 128mb l Hercules game Theater XP l 2*120GXP 120GB l NEC MultiSync FE950+ l Win XP pro
Swiftech MCW462-UHT 226W, DD Z-chip block, eheim 1250, 2*chevette heatercore.
danball1976
Veteran Icrontian
danball1976
2,634 Posts
Its in WindowsXP, that guy has Windows XP w/o SP1
Gargoyle
We can't stop here...
Gargoyle
4,685 Posts

» Subscriber

I think the "glitch" relates to not hitting the = sign after doing the dividing. When it displays 0.72, it is only saying that 0.72 is 9% of 8. If you hit 8 / 9 and then =, it will display 0.8888889.

So, hitting "8" "/" "9" "%" is like saying "8 divided by 9% of 8".
__________________ Main Rig: ASRock 939Dual-SATA2, Opteron 165 @ 9x275=2475, 7600 GT
Laptop: Dell 1520, C2D @ 2000, 8600M GT
Icrontic_11: Asus A7N8X-Deluxe, Barton @ 13x170=2210
danball1976
Veteran Icrontian
danball1976
2,634 Posts
Ok, but why doing the exact same thing on a regular calculator does something different?
dodo
Genious
dodo
319 Posts
Its probably related to the order of operations that the calculator has coded into it. If this is the case, I dont know if either could be referred to as "correct."

~dodo
dodo
Genious
dodo
319 Posts
wait...but the solution is the same when doing 8*9% and 8/9%, so it is still a bug, no?

~dodo
danball1976
Veteran Icrontian
danball1976
2,634 Posts
jdii1215 said
Um, RPN calculators enter in Reverse Polish Notation order. Algebraics use parentheses to tell what to calc first or work in entered order.
It is the diff between an old HP or TI calculator and a modern little four function credit card one. TIs usally used RPN. Most scientifics used RPN, less need to automaticly store intermediate results in RAM in calculator so less register RAM needed to calc a function, so cheaper to make.

Had you used 8/9=% or (8/9) % result should have worked right. It is a case of "does function type or strict left to right order" rule.

In this case, it looks like it did the percentage first, and that is RPN rules. Result: 8* .09 or 8*9% or 8/100/9 (<--this is how the calc thunk you wanted it to calc it using RPN rules)==8/11.1111.... ==.72 and thats how it calced it. GROAN.

Algebraic calc would get you percentage last. result .88 converted to % == 88.8888

Windows calc was coded to imitate the scientific Ti's which used RPN when it was first coded-- for Windows 3.11 or before(I saw an early version in a 3.1 OEM). Functions got added, core way of prioritizing never changed. Deliberate, not a bug.

Old-fashioned also, yes. Sorry for the history lesson.

John Danielson
Why don't they update it then to todays standards
CyrixInstead
http://www.cyrixinstead.com
CyrixInstead
1,074 Posts
Because the person using the calculator is expected to enter the sum correctly. You should do the 8/9, then take a percentage of that.

You don't just enter all the digits and expect the sum to come out correctly, you take note of the order in which operations occur i.e. * or / before + or -
__________________ Live in the UK? For the best deals on professional hairdressing products,
get yourself to AbsolutelyBabyliss.com


"There are 10 types of people in the world: those who can read binary, and those who can't."

If you were a genie and a person asked you this wish, "I wish you would not grant me this wish" what would you do?

Cyrix's home: Chateau CyrixInstead

Go Back   Icrontic Forums > Community > General Banter
Jump to
This Thread Search this Thread
Search this Thread:

Advanced Search


Current time: 9:06pm (GMT)
Powered by vBulletin®
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Get Vanilla instead. Trust me.