in chapter 4 of the zx81 manual, the answer to the problem is 8. i get that. what boggles my mind is the logic behind the answer. It's as if the minds behind the zx81 thought that normal math routines weren't fashionable and decided to screw with our (american) heads. It makes no sense to me whatsoever as, being from the US, i was taught to follow math in a specific order (namely the PEMDAS system). Can someone explain this insanity or am i not the only crazy one? Are UK math classes different from ours? What is the meaning of this lunacy?
http://zxnext.narod.ru/manuals/ZX81_Manual.pdf
zx81 math question
zx81 math question
In Heck, there are two options for perpetual torment:
Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
- 1024MAK
- Posts: 5104
- Joined: Mon Sep 26, 2011 10:56 am
- Location: Looking forward to summer in Somerset, UK...
Re: zx81 math question
If you mean this:
PRINT 20-2*3**2+4/2*3
The only thing different is that the ZX81 uses different symbols, the most unusual being that it uses ‘**’ to mean ‘raise to the power’ (or exponent) rather than the symbol ‘^’.
Mark
PRINT 20-2*3**2+4/2*3
The only thing different is that the ZX81 uses different symbols, the most unusual being that it uses ‘**’ to mean ‘raise to the power’ (or exponent) rather than the symbol ‘^’.
Mark
ZX81 Variations
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
ZX81 Chip Pin-outs
ZX81 Video Transistor Buffer Amp
Standby alert
There are four lights!
Step up to red alert. Sir, are you absolutely sure? It does mean changing the bulb
Looking forward to summer later in the year.
Re: zx81 math question
PRINT 20-2*3**2+4/2*3
This is a good brain-twister
Using my 1970s learnt order-of-operators, it all works out fine
but
this new PEMDAS idea messed with my head. At first I thought it meant "perform the Multiplications first, then the Divisions", but that results in the wrong answer. After many efforts, I tried "Muliplication and Division", which works well
going back to step 2
All these new-fangled math ideas! When I was schooled we didn't need to remember words like PEMDAS, we just looked up operator precedence in the manual (btw where is my manual, it was here a few days ago ...)
This is a good brain-twister
Using my 1970s learnt order-of-operators, it all works out fine
but
this new PEMDAS idea messed with my head. At first I thought it meant "perform the Multiplications first, then the Divisions", but that results in the wrong answer. After many efforts, I tried "Muliplication and Division", which works well
Code: Select all
PRINT 20-2*3**2+4/2*3
PEMDAS
1. Parenthesis: none
2. Exponents:
PRINT 20-2*3**2+4/2*3
3**2
9
PRINT 20-2*9 +4/2*3
3. Multiplication
PRINT 20-2*9 +4/2*3
2*9
PRINT 20-18 +4/2*3
2*3
PRINT 20-18 +4/6
***WRONG***
Code: Select all
2. result
PRINT 20-2*9 +4/2*3
3. Multiplication and Division
PRINT 20-2*9 +4/2*3
2*9
PRINT 20-18 +4/2*3
4/2
PRINT 20-18 +2 *3
2 *3
PRINT 20-18 +6
4. Addition and Subtraction
PRINT 20-18 +6
20-18
PRINT 2 +6
8
Re: zx81 math question
yup, it's a different world from the 70's
In Heck, there are two options for perpetual torment:
Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices