Page 2 of 3
Re: Are there integer numbers in the basic of x16 please?
Posted: Mon Mar 25, 2024 5:37 pm
by BruceRMcF
skaratso wrote: ↑Mon Mar 25, 2024 4:40 pm ... It's not technically "modified," as it predates the IEEE standard by at least 4 years (it looks like the IEEE 754 standard was first published in a proposal dated 1981 and then ratified in 1985), and Microsoft is responsible for the 5 byte floating point representation since the same format is used in both Commodore BASIC and Applesoft BASIC. ...
Quite. According to one account, some higher up at Commodore asked Microsoft to make the Basic able to handle their salary. Adding the bits to the Microsoft Basic floating point mantissa gave enough range to do that.
Re: Are there integer numbers in the basic of x16 please?
Posted: Mon Mar 25, 2024 8:42 pm
by DragWx
Fun fact: IEEE-754 floats have their bits arranged such that you can use a plain integer sorting algorithm to sort a list of floats, and everything will sort correctly.
Too bad the sign bit is in the wrong place on CBM floats.
Re: Are there integer numbers in the basic of x16 please?
Posted: Tue Mar 26, 2024 4:18 am
by Slevin
TomXP411 wrote: ↑Mon Mar 25, 2024 4:38 pm
CBM has the exponent first, followed by the sign and mantissa.
CBM Float
Exponent S Mantissa
0111 1111 0 0000 0000 0000 0000 0000 0000 0000 000
IEEE-754 Float
S Exponent Mantissa
1 0111 1111 0000 0000 0000 0000 0000 000
Some examples:
2.0 = 1.0 * 2
3.0 = 1.5 * 2
5.0 = 1.25 * 4
2024 = 1.9765625 * 1024
Many thanks for this detailed explanation, helped a lot, especially the placement of the sign bit.
Re: Are there integer numbers in the basic of x16 please?
Posted: Wed Mar 27, 2024 3:25 pm
by mortarm
BruceRMcF wrote: ↑Mon Mar 25, 2024 5:37 pm
Quite. According to one account, some higher up at Commodore asked Microsoft to make the Basic able to handle their salary. Adding the bits to the Microsoft Basic floating point mantissa gave enough range to do that.
Somehow, I rather doubt that they'd rely on BASIC to do their payroll.
Re: Are there integer numbers in the basic of x16 please?
Posted: Wed Mar 27, 2024 4:56 pm
by hstubbs3
mortarm wrote: ↑Wed Mar 27, 2024 3:25 pm
BruceRMcF wrote: ↑Mon Mar 25, 2024 5:37 pm
Quite. According to one account, some higher up at Commodore asked Microsoft to make the Basic able to handle their salary. Adding the bits to the Microsoft Basic floating point mantissa gave enough range to do that.
Somehow, I rather doubt that they'd rely on BASIC to do their payroll.
I totally could believe some higher-up wanted to show off that it can display their salary.
Totally something that maybe was used like 5 times for a demo or something, max... and never bothered with again...
It does sound like a tall tale of the ancient days of yore, but there are stranger tales ...
https://www.catb.org/jargon/html/S/scratch-monkey.html
Re: Are there integer numbers in the basic of x16 please?
Posted: Thu Mar 28, 2024 6:46 pm
by BruceRMcF
mortarm wrote: ↑Wed Mar 27, 2024 3:25 pm
BruceRMcF wrote: ↑Mon Mar 25, 2024 5:37 pm Quite. According to one account, some higher up at Commodore asked Microsoft to make the Basic able to handle their salary. Adding the bits to the Microsoft Basic floating point mantissa gave enough range to do that.
Somehow, I rather doubt that they'd rely on BASIC to do their payroll.
As I understood it, that's not the point being made. A single floating point format is the "universal number" for that generation of Microsoft Basic, the idea was that if it couldn't express his salary, it probably wasn't universal enough.
It was from some presentation I saw a video of on Youtube, IIRC the person passing it along had worked at Commodore but wouldn't have been in the room at that kind of meeting, so it could well be apocryphal.
As it was the story circulating inside at least some circles in Commodore, at the very least it must have sounded plausible to them.
Re: Are there integer numbers in the basic of x16 please?
Posted: Thu Mar 28, 2024 6:57 pm
by Edmond D
BruceRMcF wrote: ↑Thu Mar 28, 2024 6:46 pm
mortarm wrote: ↑Wed Mar 27, 2024 3:25 pm
BruceRMcF wrote: ↑Mon Mar 25, 2024 5:37 pm Quite. According to one account, some higher up at Commodore asked Microsoft to make the Basic able to handle their salary. Adding the bits to the Microsoft Basic floating point mantissa gave enough range to do that.
Somehow, I rather doubt that they'd rely on BASIC to do their payroll.
As I understood it, that's not the point being made. A single floating point format is the "universal number" for that generation of Microsoft Basic, the idea was that if it couldn't express his salary, it probably wasn't universal enough.
It was from some presentation I saw a video of on Youtube, IIRC the person passing it along had worked at Commodore but wouldn't have been in the room at that kind of meeting, so it could well be apocryphal.
As it was the story circulating inside at least some circles in Commodore, at the very least it must have sounded plausible to them.
Having tried to understand COBOL, I could see BASIC being plausible for simple payroll calculations.
Re: Are there integer numbers in the basic of x16 please?
Posted: Thu Mar 28, 2024 9:16 pm
by funkheld
comal 80 for the x16 would be great.
on the c64 there is the wonderful cobol80.
The x16 has great properties from the c64.
greeting
Re: Are there integer numbers in the basic of x16 please?
Posted: Thu Mar 28, 2024 11:14 pm
by Edmond D
funkheld wrote: ↑Thu Mar 28, 2024 9:16 pm
comal 80 for the x16 would be great.
on the c64 there is the wonderful cobol80.
The x16 has great properties from the c64.
greeting
No, thank you.
Re: Are there integer numbers in the basic of x16 please?
Posted: Fri Mar 29, 2024 3:07 am
by ahenry3068
Edmond D wrote: ↑Thu Mar 28, 2024 11:14 pm
funkheld wrote: ↑Thu Mar 28, 2024 9:16 pm
comal 80 for the x16 would be great.
on the c64 there is the wonderful cobol80.
The x16 has great properties from the c64.
greeting
No, thank you.
I will have to say I find it pretty remarkable that there is such a thing as COBOL on the C64, in any form at all. I do 2nd Edmond's no thank you though... I think I might do "Hello World" just for S's & G's but I don't think I would go further than that.