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.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. ...
Are there integer numbers in the basic of x16 please?
Re: Are there integer numbers in the basic of x16 please?
Re: Are there integer numbers in the basic of x16 please?
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.
Too bad the sign bit is in the wrong place on CBM floats.
Re: Are there integer numbers in the basic of x16 please?
Many thanks for this detailed explanation, helped a lot, especially the placement of the sign bit.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
Re: Are there integer numbers in the basic of x16 please?
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?
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?
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?
Having tried to understand COBOL, I could see BASIC being plausible for simple payroll calculations.BruceRMcF wrote: ↑Thu Mar 28, 2024 6:46 pmAs 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?
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
on the c64 there is the wonderful cobol80.
The x16 has great properties from the c64.
greeting
- ahenry3068
- Posts: 1136
- Joined: Tue Apr 04, 2023 9:57 pm
Re: Are there integer numbers in the basic of x16 please?
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.