Killing off Floating Point PAIR!

Rebol2 did not have floating point pairs:

rebol2>> 10.20x3.04
** Syntax Error: Invalid tuple -- 10.20x3.04

Red is very focused on graphics and making PAIR! play a central role. Despite that, it also does not have floating point pairs:

red>> 10.20x3.04
*** Syntax Error: (line 1) invalid pair at 10.20x3.04

A particularly irksome aspect of the R3-Alpha implementation of PAIR! was that it used 32-bit floating point numbers in its math, while 64-bit double precision integers were behind DECIMAL!. This meant you had two different precisions of math being implemented. And you would lose information picking the decimal numbers out of pairs and putting them back in. :frowning:

That was also true of the integer form of PAIR! too. You couldn't store an arbitrary 64-bit INTEGER! into a PAIR!, because it only had room for 2 32-bit integers in the cell. :frowning:

I fixed these issues by making a fully generic optimized mechanic that could store any two cells together. This wound up being fairly relevant in other ways that have nothing to do with PAIR!.

In any case, in the ever present drive to simplify anything that is not mission critical, I think decimal point pairs will probably get the axe. They raise questions I simply do not feel are worth answering.

If not even Red can bring themselves to care, why on earth should I?

2 Likes