[TUHS] How to do differential/integral on a PDP-7, was: Space Travel

Michael Kjörling michael at kjorling.se
Sun Oct 20 06:12:43 AEST 2019

On 20 Oct 2019 00:02 +0530, from abhinavrajagopalan at gmail.com (Abhinav Rajagopalan):
> Forgive me for both hijacking this thread, and to address my amateurish
> gnawing concern, but how was it be possible to write differential/integral
> equations at an assembly/machine level at the time, especially in machines
> such as the PDP-7 and such which had IIRC just 16 instructions and operated
> on the basis of mere words, especially the floating point math being done.

As long as you have the basic instructions (which pretty much any
computer capable of doing useful arithemtic calculations will need
anyway), you can implement the rest of what you need using those
building blocks. Specific _hardware_ support for floating point
calculations is not needed.

If nothing else, you can always implement your own routines to do
fixed-point multi-word arithmetic. Really about all you need for that
is the basic arithmetic and binary operations, the concept of a carry
or overflow flag, and conditional and unconditional jumps. With the
_possible_ exception of a carry flag of some kind, a digital computer
really wouldn't be very useful without those!

>From there to emulating floating-point instead is not a huge leap.

Given that, the kind of equations you can use the computer to solve is
just a matter of how fast you need to have the answers.

Emulation might be slow, and implementing your own might not be pretty
by today's standards where we're taught to rely on standard libraries,
but it definitely can get the job done.

If you want an example that might perhaps be easier to relate to, on
the IBM PC, it wasn't until the Pentium that you could actually count
on having a floating-point unit available. The 8086/8088, 80186,
80286, 80386 and 80486 all either didn't ever include a FPU on-die, or
only some variants included a FPU. (In the IBM PC world, that's pretty
much from 1981 to the late 1990s.) On some systems, and with some of
those CPUs, a FPU was an extra chip the user would install, or have
someone install, on the motherboard; with others, the user could
choose to purchase variants with or without a FPU. As a result, for
the better part of two decades, PC software that needed the ability to
do floating-point calculations but couldn't require a separate
hardware FPU shipped with support for emulating floating point in
software. Again, the emulation was slower, but it got the job done,
and it allowed running the software on a huge portion of the hardware
base which otherwise wouldn't have been able to do so.

Michael Kjörling • https://michael.kjorling.semichael at kjorling.se
  “The most dangerous thought that you can have as a creative person
              is to think you know what you’re doing.” (Bret Victor)

More information about the TUHS mailing list