[Info-vax] VMS Software Q1 '23 Update
Arne Vajhøj
arne at vajhoej.dk
Sun Jan 29 19:24:43 EST 2023
On 1/29/2023 7:17 PM, Arne Vajhøj wrote:
> On 1/29/2023 5:41 PM, Dave Froble wrote:
>> gfloat, sfloat, tfloat, and xfloat. These formats correspond
>> to the
>> SINGLE, DOUBLE, GFLOAT, SFLOAT, TFLOAT, and XFLOAT keywords.
>>
>> Keyword Range
>> Precision
>
>> DOUBLE (64-bit) .29 * 10^-38 to 1.7 * 10^38 16
>> digits
>> GFLOAT (64-bit) .56 * 10^-308 to .90 * 10^308 15
>> digits
>
>> Now, it has been my impression that that DOUBLE is D-float.
>>
>> Walks like a D-float
>> Quacks like a D-float
>> Is it a D-float?
>
> Good question.
>
> It can certainly take D float as input and provide D float
> as output.
>
> The question is how.
>
> The Alpha architecture manual says that it only
> supports:
> - load D from memory
> - convert from D to G
> - do G math
> - convert back from G to D
> - store D in memory
> which sort of operate on D float but loose 3 bits precision.
>
> The alternative is software emulation, which will be able to do VAX
> compatible D math but at a speed cost.
>
> So either hardware G math loosing 3 bits of precision (which is what
> I assume when I asked the question above) or software full D math.
Experiment:
$ type d.bas
program d
declare double x, y, z
x = 12.34
y = 45.67
z = x + y
print z
end program
$ bas/noop/list/mach d
$ sear d.lis cvtdg,addg,cvtgd
57EA13CA 0060 CVTDG F10, F10
57EB13CB 0068 CVTDG F11, F11
554B140A 0070 ADDG F10, F11, F10
57EA15AA 0074 CVTGD F10, F10
Looks like G math to me.
(it does something smart with /OPT so that is why the /NOOP is used)
Arne
More information about the Info-vax
mailing list