by jerf · 4y ago · 0 comments
That's a very programmer-centric take. A very, very programmer-centric take. The use of "e" for exponent in scientific notation is a very computer-oriented take on the problem. Such other places as you may have seen it used are leaks from the computer representation. Nobody else sees numbers that way; scientific notation is generally written as 3.278·10³⁶ (only with better superscripts), which is how it is taught in schools for the most part. There are many contexts where I would say it is not a valid part of a number, because I don't expect my users to know scientific notation, let alone an idiosyncratic rendering of it used only for historical reasons in certain niches of the programming world.
My (c) 1977 version of K&R C explains printf() around page 145, and it supports the %f notation for output of float's as 1.234e-8, etc.
This Fortran IV manual (early-mid 1960s, https://www.math-cs.gordon.edu/courses/cs323/FORTRAN/fortran...) lists the same exponential notation, but with capital E for REAL's and capital D for double's.
This pre-dates the first hand calculator I know of, the early HP's from 1968. These machines used the same notation as the HP-35 pictured below (https://www.hpmuseum.org/rpnvers.htm#num).
The HP-35 calculator came out in 1972. According to the page below, the scientific notation used is of the form
1.234-8
i.e., without the E (see the second row of the gallery).
https://vintagecalc.com/hp-35-red-dot/
Just a couple of data points.
It’s a pain in the arse to write, though, which is why quite a lot of scientists and engineers use e even though they don’t know anything about programming and are very, very far from being CS people.
I don’t know anyone who would enter 310^8 naturally in an input field (besides, using for multiplication itself comes from ancient technological limits, but nobody uses the proper multiplication sign either).
So yes, you need to support e for scientific notations in any input field that can be used for large or small numbers.
> scientific notation is generally written as 3.278·10³⁶ (only with better superscripts), which is how it is taught in schools for the most part.
That’s how we write it in LaTeX and our reports, articles, and such. And presentations if you’re lucky. But again, nobody writes that if presentation does not matter enough to go through the hassle. Certainly not in plain text where you’d have to use Unicode characters, at which Windows is completely incompetent.
A _scientific_ calculator? Because many cheap calculators will just overflow and not use the scientific notation.
You severely overestimate the... amount of data people retain from school (to put it in nice terms).
I guess the point is, you can parse it and output it in whatever format is appropriate, regardless of how it is stored.
If you are creating software for engineers, that's a fair assumption to make (that will understand what an exponent is). The public at large? Absolutely not.
A large segment of older adults have never used them.
As a Brit that looks really weird. I'd expect 3·278×10³⁶.