Questions tagged [floating-point]

Floating point arithmetic: number formats, instruction sets, software and hardware implementations.

Filter by
Sorted by
Tagged with
4 votes
1 answer
157 views

Who were the members of the IEEE 754 working group?

The IEEE 754 working group began meeting in 1977, produced a draft standard for floating-point arithmetic by the beginning of the eighties, and had it formally ratified in 1985, by which time it was ...
user avatar
  • 48.8k
32 votes
7 answers
4k views

Did any PC software floating point use non-IEEE format?

During the 1980s, prior to the 486 (well, strictly speaking, prior to the discontinuing of the 486SX in the nineties), IBM PCs and compatibles had hardware floating point only in the form of an ...
user avatar
  • 48.8k
4 votes
2 answers
1k views

What was the first CPU/FPU without a hardware square-rooter?

The first programmable, electronic, general-purpose digital computer, ENIAC had a "square rooter": five of the accumulators were controlled by a special divider/square-rooter unit to ...
user avatar
  • 15.4k
5 votes
2 answers
263 views

Did any computer ever signal floating-point overflow purely with a sticky flag?

Every implementer of floating-point arithmetic, needs to think about how to signal overflow. One possible way to do it is by raising an exception, though this creates the problem that 'exception' can ...
user avatar
  • 48.8k
31 votes
3 answers
3k views

What aspect of portable floating point did Java back down on?

Java was released under the slogan 'write once, run anywhere'; while its adoption was probably more about 'now we have a language that provides garbage collection in a familiar workflow and with a ...
user avatar
  • 48.8k
5 votes
0 answers
230 views

What was this book about floating-point system design/construction?

A comment on the question Why did 8-bit Basic use 40-bit floating point? says the following (emphasis added): Re, "Nowadays, floating point is usually either 32 or 64 bits." More ...
user avatar
  • 3,072
3 votes
1 answer
1k views

What precision did the original PlayStation use?

The PlayStation 1 performed all calculations in fixed point. On the face of it, this is straightforward enough; it couldn't afford floating-point hardware, which was introduced only later, with the ...
user avatar
  • 48.8k
16 votes
2 answers
2k views

Why did the 8087 need a special socket?

The IBM PC included a coprocessor socket for the 8087 floating-point unit. Logical enough; some customers wanted to use the 8087 to make numeric calculations run faster. But why was the 8087 designed ...
user avatar
  • 48.8k
2 votes
1 answer
297 views

Clear description of MS BASIC number → string conversions?

I'm failing to find a concise document that describes the formatting used by (6502) MS BASIC when converting internal floating-point numbers to text for display in PRINT, STR$, etc. I know it has a ...
user avatar
9 votes
3 answers
2k views

Why did decimal arithmetic slow down VisiCalc?

There is an excellent article about VisiCalc that goes into all the details about what happened and why, highly recommended if you are interested in that part of computing history. I was reading this ...
user avatar
  • 48.8k
4 votes
2 answers
299 views

What was the first vector supercomputer?

I am trying to understand the trade-offs between scalar and vector machines, the threshold of complexity/transistor count/performance at which vector machines started to make sense. As data points, ...
user avatar
  • 48.8k
24 votes
8 answers
5k views

Why did 8-bit Basic use 40-bit floating point?

Nowadays floating point is usually either 32 or 64 bits, sometimes 16, occasionally 128. But of course, the Basic interpreters on the 8-bit machines, having to implement floating point in software ...
user avatar
  • 48.8k
32 votes
2 answers
3k views

What did Pete Stewart think he knew about efficient implementation of floating point denormals?

The most controversial part of the IEEE 754 floating-point standard is gradual denormals. Typically they trap to software rather than being implemented in hardware. In the common case where a workload ...
user avatar
  • 48.8k
2 votes
1 answer
201 views

How did VisiCalc decide how many decimal places to display?

VisiCalc represented numbers in BCD to be able to handle decimals precisely. But how did it decide how many decimal places to display? In some screenshots like https://www.researchgate.net/figure/A-...
user avatar
  • 48.8k
10 votes
3 answers
1k views

What performance increase did an Amiga typically get with an FPU?

After seeing this question, I reminisced about how my old Amiga 2500/030 had a 68882 FPU unit. I recall that the Amiga's floating point routine library was smart enough to detect if you had an FPU or ...
user avatar
  • 14.1k
3 votes
1 answer
488 views

What were the most common applications of the 8087?

The original IBM PC had a slot for the 8087 floating-point coprocessor. This was a somewhat esoteric feature at the time – previous microcomputers had done all their floating-point in software – but ...
user avatar
  • 48.8k
3 votes
2 answers
464 views

How did the NSA use vector supercomputers?

In the 80s, the NSA was a major customer of supercomputers. https://www.nsa.gov/Portals/70/documents/news-features/declassified-documents/cryptologic-quarterly/NSA_and_the_Supercomputer.pdf discusses ...
user avatar
  • 48.8k
18 votes
1 answer
1k views

Detecting the external x87 FPU

On modern processors the x87 FPU is integrated in the CPU chip, but it used to be a separate chip before the 80486. So is there any way to detect its presence, and maybe even its generation (8087, ...
user avatar
  • 1,417
9 votes
4 answers
2k views

Why the change in layout of single and double precision in floating-point registers?

The Intel 8087 supported both single and double precision floating point, but only in memory; the on-chip registers were purely double precision. (Strictly speaking they were actually 80-bit extended ...
user avatar
  • 48.8k
11 votes
3 answers
1k views

How can I understand numerical precision of values in Microsoft BASIC (on the Dragon 32)?

I implemented a differential equation solver on my Dragon 32 (which uses Microsoft Extended Color BASIC) but the results I get quickly diverge from those I expect, which are the same as those I get ...
user avatar
9 votes
10 answers
3k views

How did dusty deck Fortran handle overflow?

In Fortran 77, numerical code that ran on IBM, CDC, Cray etc, how was overflow typically handled? Did it raise an exception? (I would expect such an exception to be inexact on vector machines, i.e. to ...
user avatar
  • 48.8k
9 votes
1 answer
930 views

What was the performance penalty for denormal inputs on 80s-era FPUs?

Some FPUs exhibit as much as an order of magnitude slowdown when given denormal inputs, due to having to trap to microcode to handle them. Did early FPUs of the microprocessor era, exhibit substantial ...
user avatar
  • 48.8k
6 votes
1 answer
331 views

Which x87 first acquired the ability to flush denormal to zero?

On modern Intel FPUs, you can set a flag to cause all denormals to be automatically flushed to zero. On some workloads, this improves performance. I cannot find any mention of that flag in the data ...
user avatar
  • 48.8k
6 votes
2 answers
451 views

Why did the CDC 6600 expand the word size to 60 bits?

According to http://www.quadibloc.com/comp/cp0201.htm The CDC 1604 used 48-bit floating point with 11 bits exponent and 36 bits mantissa. There was also a double precision format (which I believe was ...
user avatar
  • 48.8k
4 votes
5 answers
815 views

Z88DK ZX Spectrum "%f" printf not working

I'm attempting to compile a program in C for the ZX Spectrum using Z88DK. However, I'm facing an issue when trying to use printf to print out the value of a float. The code I'm trying to compile: #...
user avatar
  • 81
9 votes
2 answers
503 views

Where to share/who may be interested in IEEE 16 bit half float library for Zilog Z80?

I have recently developed a half-float/16-bit float library (link to Github) for Zilog Z80. It was a part of my project to run some neural network and graphics POCs for ZX Spectrum. The library uses ...
user avatar
  • 213
39 votes
3 answers
8k views

Where did the free parameters of IEEE 754 come from?

It's clear where many of the design decisions of IEEE 754 floating point come from. For example, the binary format maximizes efficiency on binary hardware. And 32 and 64 bits for single and double ...
user avatar
  • 48.8k
23 votes
1 answer
1k views

How good was Woz's FP code?

I just came across this amazing 1976 article by Woz. In it he describes a relatively complete floating-point system for the 6502 with a 32-bit format (similar to earlier MS code). I understand the ...
user avatar
13 votes
3 answers
5k views

When did game consoles begin including FPUs?

Floating-point coprocessors (FPUs) were an expensive, niche, add-on product for early desktop and home computers. but became commonplace by the mid-1990s, as they began to be included within the most ...
user avatar
  • 56.2k
6 votes
3 answers
1k views

Why is modulo operation an operator for integer types but only a function for floating-point ones?

In C, we have the % operator which finds remainder of division. But it's only applicable to integral types. For floating-point types we have to use fmod function from math.h. This makes an impression ...
user avatar
  • 1,255
52 votes
7 answers
12k views

Did any compiler fully use Intel x87 80-bit floating point?

There is a paradox about floating point that I'm trying to understand. Floating point is an eternal struggle with the problem that real numbers happen to be both essential and incomputable. It's the ...
user avatar
  • 48.8k
22 votes
2 answers
6k views

What was the last x86 CPU that did not have the x87 floating-point unit built in?

This Wikipedia page says the following: Most x86 processors since the Intel 80486 have had these x87 instructions implemented in the main CPU So the above quote implies that some CPUs that were ...
user avatar
  • 273
37 votes
1 answer
4k views

How did the 8086 interface with the 8087 FPU coprocessor?

The 8087 has many instructions - too many, it seems, to be encoded as part of the 8086 instruction set. How did the Intel 8086 interface with an Intel 8087 FPU that a user added? Consider the ...
user avatar
  • 1,917
4 votes
2 answers
578 views

Did any early computers use a different radix to improve accuracy of rational arithmetic?

Fractions like a third, a fifth, a tenth and so on cannot be precisely represented in binary, because those would be recurring fractions and so would never fit in a (reasonable) data structure. And ...
user avatar
  • 33.6k
6 votes
3 answers
254 views

How does the floating point conversion in Zuse's machines work?

Can someone please help me understand the floating point to readable decimal conversion algorithms of the Z1 and Z3? There is a patent in German containing all the information but I can't speak German....
user avatar
4 votes
1 answer
297 views

ENIAC stands for Electrical Numerical Integrator And Calculator; what made it particularly suitable for numerical integration?

The acronym ENIAC stands for Electrical Numerical Integrator And Calculator. The fact that it was simpy a numerical computer means it probably could be used to perform numerical integration in some ...
user avatar
  • 2,159
21 votes
6 answers
2k views

Commodore BASIC and binary floating point precision

I am mildly curious that though the 6502 provides BCD arithmetic which would be useful for implementing decimal floating point, Commodore BASIC uses, like all (?) Micro-Soft BASIC, binary floating ...
user avatar
  • 48.8k
13 votes
3 answers
2k views

Why does Sinclair BASIC have two formats for storing numbers in the same structure?

The ZX Spectrum has two formats for storing numbers, both 40 bits, or five bytes. The first is a floating point format, which consists of one exponent byte, and four mantissa bytes. The first bit of ...
user avatar
  • 33.6k
8 votes
1 answer
613 views

How can floating point addition be so slow on a BESM-6?

In the BESM-6 technical manuals — for example, in the ALU description, page 4 — there is a table specifying min/max/average instruction latencies in clock cycles (the last 3 columns; the ...
user avatar
  • 15.4k
10 votes
1 answer
469 views

Which pre-IEEE computers had a single precision FPU and implemented double precision floats in software?

Before the formats of floating point numbers have been standardized in IEEE 754 in 1985, different vendors had used many different floating point formats, some of them listed on the Data Format and ...
user avatar
  • 15.4k
6 votes
2 answers
711 views

Floating Point on Konrad Zuse's computers

From what I understand, with floating point arithmetic, shifting values up and down is important, since a floating point value essentially is an equation like 2e×m. This supposition may be supported ...
user avatar
  • 33.6k
2 votes
2 answers
599 views

Using C64 floating point kernal routines with 16 bit integer

How to use floating point kernal routines for 16 bit arithmetics such as: $1234*$ABCD or $1234/$ABCD ?
user avatar
  • 291
49 votes
11 answers
21k views

Why not use fractions instead of floating point?

Considering all those early home computers, the ZX Spectrum, the Galaksija, the VIC-20, the Apple I/II/III, and all of those, they all have some 8-bit CPU which does integer arithmetic and no floating ...
user avatar
  • 33.6k
1 vote
1 answer
658 views

How adequate would 48-bit floating point be? [closed]

Though power of 2 word sizes look in hindsight like a natural consensus, historical computers used quite a wide variety, including but not limited to 9, 18, 36, 12, 24 and 60 bits. Power-of-2 ...
user avatar
  • 48.8k
8 votes
3 answers
3k views

Floating point performance of classic minicomputers

Are there any numbers available for the floating point performance of classic minicomputers of the seventies and eighties? For example, the VAX 11/780 for integer calculations was generally rated in ...
user avatar
  • 48.8k
8 votes
1 answer
2k views

128-bit floating point

IEEE 754 defines 128-bit floating point, though perhaps in a three-way chicken and egg problem, it's rarely supported by hardware, rarely supported by compilers, and rarely used. Have there been, ...
user avatar
  • 48.8k
20 votes
5 answers
2k views

What other computers used this floating-point format?

I have discovered that the DEC PDP-10 used a floating-point format that differed from IEEE-754 in an interesting way. IEEE-754 is like sign-magnitude representation. The only difference between a ...
user avatar
6 votes
1 answer
447 views

When were floating point rounding modes first implemented?

It appears that at least some pre-IEEE 754 computers had only one hardwired floating point rounding mode, e.g. away from zero as in PDP-11 (page 154 of PDF). Which historical architectures were the ...
user avatar
  • 15.4k