our apollo program

By : ilikephone / On : 12/02/2023

When you look at the footage of the Apollo program, which lasted from the 1960s to 1972, the impressive thing is the slide rule in your pocket. At that time, scientific calculators were still desktop models, and pocket-sized calculators that could barely run on batteries could only perform the four arithmetic operations. The slide rule was good at calculating approximate values ​​quickly, but it was not possible to obtain exact values. However, it was used as a quick calculation tool during the idea review stage without taking a long time to calculate. The HP-35, released in 1972, was the first pocket-size scientific calculator that could replace a slide rule.

The pocket-sized scientific calculator quickly replaced the slide rule, but machines equipped with 8-bit CPUs, which are the prototype of current personal computers, soon appeared. When the IBM PC appeared in 1981, in the middle of the 1980s, most of the calculation work was carried out by PCs.

Calculators have difficulty handling large amounts of data. Even today, many scientific calculators have a function called "statistics mode" that allows you to enter a large number of values ​​and calculate the average value and standard deviation. The author also helped me in an experiment class at university, but now I can do work that can be done without any stress with spreadsheet software (the first spreadsheet software Visicalc was released in 1979) on a one-line display. was quite a tedious task. Still, the results were faster than hand calculations, but the processing of these large amounts of data has been superseded by PCs.

Every person is different, but sometimes you have to do some calculations that are difficult to calculate in your mind. Estimate the amount of materials required for a small craft, find the price including consumption tax, find the total number of characters from the number of lines, etc. In some cases, you may have to solve junior high or high school level mathematics problems, such as simultaneous equations, quadratic equations, and calculations involving trigonometric functions. However, in many cases, it is rather calculation-intensive and does not require complicated repetitive calculations, and in most cases there is no need to use a formula manipulation system such as Maxima (Note 01) or even write a program. Using Excel is fine, but a calculator gives you faster results when you consider startup time. Windows, Android, and Chromebook each have a GUI calculator program installed as a basic application, so you can get by with these.

Note 01: Maxima, a Computer Algebra Systemhttps://maxima.sourceforge.io/

Until about 10 years ago, I had a scientific calculator next to my computer. I didn't have to wait for the GUI application to start up, and the calculator was faster and less stressful. Nowadays, even a GUI calculator program starts up in no time. As a result, the actual calculator became unnecessary. However, the "function" of being able to calculate without being interrupted while thinking is necessary. What you need to do with these “tools” is not to get lost in how to use them. It doesn't have to be "easy", but I don't want to have to look up how to use it when trying to do a slightly complicated calculation.

I have become accustomed to HP's reverse Polish calculator, so I use software called Emu48 (picture 01, note 02) that emulates the HP-48GX released in the 1990s. . In addition to Windows, there is also an Android version, so you can use the same calculator on your Chromebook.

Note 02: Christoph Giesselink Emu48 Page https://hp.giesselink.com/emu48.htm

Our Apollo program

The 8-bit CPU machines that appeared around 1977-1980 banished calculators from technical computing. With BASIC, it was easy to calculate large numbers of numbers, and we were free to do anything other than standard calculations such as averages and standard deviations. Machines of this era did not have an operating system, and started with a BASIC interpreter. This interpreter had a feature called "direct mode" that allowed the direct execution of BASIC functions, formulas and statements. Basically, it was intended to execute programs in the BASIC language, but in direct mode, small calculations could be executed on the spot.

It is the same as the REPL (Read-Eval-Print Loop) that many languages ​​now have. REPL is a function that was equipped with Lisp machines, etc., and it got this name because it was made with a loop that repeats input (Read), evaluation (Eval), and display (Print). Since the Lisp machine was developed at MIT in the 1970s and commercialized in the early 1980s, it is thought that direct mode and REPL were born independently at the same time. However, the APL for mainframes created in 1966 had already realized the concepts of direct mode and REPL in the form of workspaces. The IBM 5100, which recently appeared in anime and became famous, could switch between BASIC and APL to start up, and both could be used in the same way.

Direct mode and REPL are functions that can be called a command line calculator. The functions of the language can be used as they are, so if you are familiar with the language, you can use it without hesitation. As a difference from a calculator, there is a point that string operation, base number calculation, and bit operation can also be performed. Although it depends on the language, it also has the advantage of being able to easily save intermediate results in variables, call up calculations that have been executed in the past with the history function, rewrite them, and define functions. In addition, since recent languages ​​have extensive libraries, programming is often unnecessary for simple calculations such as matrix calculations.

Furthermore, modern languages ​​usually have a built-in library for arbitrary precision arithmetic (or multiple precision arithmetic) called bignum, etc., which can be used to perform arbitrary precision calculations. can. For example, a 64-bit binary number exceeds 20 decimal digits. However, calculators and Excel have only 10 to 15 digits of significant digits and can only calculate approximate values.

Excel also has functions to handle hexadecimal numbers, but standard functions (eg HEX2DEC for hexadecimal conversion) are limited to 40 bits. The HP-48GX emulated by the aforementioned Emu48 can handle 16/8/binary numbers up to 64 bits, but the display width is only 22 characters, so the range of practically usable bit numbers is limited.

I use Ruby's REPL, irb, for this purpose. It can be calculated as it is even with multiple digits, and numerical functions can be specified as "Math::sqrt(x)" because they are of the Math class. However, in Ruby, hexadecimal and binary numbers are calculated as decimal numbers internally, so they cannot be displayed in hexadecimal or binary numbers without using format specifications. Using the Linux/UNIX console computer program dc (Note 03), it is possible to set the radix of input and output as a mode, but it can be difficult to use if you are not used to it, such as having to specify the next radix based on the changed radix. be. Android apps cannot use irb, but can use Python. Python's operators are almost the same as Ruby's, and although there are differences in octal notation, they can be used in roughly the same way.

Note 03: Man page of DChttps://linuxjm.osdn.jp/html/GNU_bc/man1/dc.1.html

This title is based on the 2016 American movie Hidden Figures. It is about NASA's Mercury program in the early 1960s, but the original Japanese title was ``Dream. "Apollo 13" (1995) is famous for the Apollo project movie, but the 1998 American TV series "From the Earth to the Moon", starring Tom Hanks, served as a guide. / Humans stand on the moon) is spectacular. Especially the time of the moon lander development of the 5th talk is good. The use of the ending title song "I Wish I Was a Spaceman" from the 1960s British sci-fi TV drama Fireball XL-5 makes me cry.