Friday, January 14th, 2005 04:39 pm
Does anyone have information on how to use the two following items in TRS-80 Basic (or similar), circa 1983?

1) EXP(variable name) i.e. LET X = EXP(Y)
2) ! i.e. IF X < 4! THEN PRINT X

I know that the first one is an exponentiation function, but the only thing I can find on using it says, "raise e to the power of Y". Except there is no "e" mentioned!

As for 4!, my brain keeps trying to read that as "4, factorial" but I don't think that's right.

Anyone?
Tuesday, January 18th, 2005 09:55 pm (UTC)
via maths: e=2.718etc. It's irrational, so if you want more decimal places, the web can probably provide them out to a million or two... ;-) (type e= into google for a start on 'em). So exp(y) would be 2.718^y.

4! is 4 factorial in maths, so that's probably where your brain is reading from. Whether or not the programming language has another meaning for the !, though, I can't say. OTOH, what you've got reminds me a hell of a lot of the sort of BASIC (and basic *g*) programmes I'd have seen way back when I first had anything to do with computers at about ten or eleven or so, and in those, it *would* have been 4! (basic maths functions tended to be basic maths functions, in those programmes).

Hope that helps some, anyway!

{{hugs}}