The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: "Michael Kjörling" <michael@kjorling.se>
To: tuhs@tuhs.org
Subject: Re: [TUHS] How to do differential/integral on a PDP-7, was: Space Travel
Date: Sat, 19 Oct 2019 20:12:43 +0000	[thread overview]
Message-ID: <zrz47njfzctbxdqsjnnskppq@localhost> (raw)
In-Reply-To: <CANOZ5rjGQeA3BFaMFXV3s-+11Ev9th2zerhvmBZetT6q0Eh2VQ@mail.gmail.com>

On 20 Oct 2019 00:02 +0530, from abhinavrajagopalan@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.se • michael@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)


  parent reply	other threads:[~2019-10-19 20:13 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-19 14:40 [TUHS] Space Travel, was New: The Earliest UNIX Code Doug McIlroy
2019-10-19 18:32 ` Abhinav Rajagopalan
2019-10-19 18:44   ` Abhinav Rajagopalan
2019-10-19 19:19   ` Clem Cole
2019-10-19 19:50     ` Henry Bent
2019-10-19 19:55       ` [TUHS] Space Travel related question Thomas Paulsen
2019-10-19 20:19         ` Warner Losh
2019-10-19 20:24       ` [TUHS] Space Travel, was New: The Earliest UNIX Code Arthur Krewat
2019-10-19 20:12   ` Michael Kjörling [this message]
2019-10-19 20:40     ` [TUHS] How to do differential/integral on a PDP-7, was: Space Travel Arthur Krewat
2019-10-19 21:15       ` Michael Kjörling
2019-10-21  5:14       ` Dave Horsfall
2019-10-21  5:23         ` Lars Brinkhoff
2019-10-21 13:59           ` John P. Linderman
     [not found]             ` <68553366-4E6F-4E17-8903-282C67186D16@humeweb.com>
2019-10-26  2:24               ` Dave Horsfall
2019-10-26  2:09           ` Dave Horsfall
2019-10-21  4:55     ` Dave Horsfall
2019-10-21 19:21       ` Paul Winalski
2019-10-21 19:38         ` Kurt H Maier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=zrz47njfzctbxdqsjnnskppq@localhost \
    --to=michael@kjorling.se \
    --cc=tuhs@tuhs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).