[Info-vax] VMS Software Q1 '23 Update

Arne Vajhøj arne at vajhoej.dk
Tue Jan 31 20:25:04 EST 2023


On 1/29/2023 11:16 PM, Dave Froble wrote:
> On 1/29/2023 7:17 PM, Arne Vajhøj wrote:
>> 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.
> 
> Correct, that is how it's provided.
> 
>> The alternative is software emulation, which will be able to do VAX
>> compatible D math but at a speed cost.
> 
> Would you think it would do better than the loss of the 3 bits?  Not an 
> issue most of the time.  However,  I'm aware of a few instances where 
> things aren't so good.  I seem to recall the 5.9 to 6.0 range having an 
> issue.

Those bit are usually not significant.

I had to think hard to come up with an example showing
the bits getting chopped off.

program dg

declare integer i

external sub test(integer)

for i = 0 to 15
     call test(i)
next i

end program
!
sub test(integer v)

map (xb) double x
map (xb) byte b(7)

external double function add(double, double)

b(0) = 0
b(1) = 64
b(2) = 0
b(3) = 0
b(4) = 0
b(5) = 0
b(6) = v
b(7) = 0
x = add(x, 0.0)
print v, "->", b(6)

end sub
!
function double add(double a, double b)

add = a + b

end function

$ r dg
  0            ->             0
  1            ->             0
  2            ->             0
  3            ->             0
  4            ->             8
  5            ->             8
  6            ->             8
  7            ->             8
  8            ->             8
  9            ->             8
  10           ->             8
  11           ->             8
  12           ->             16
  13           ->             16
  14           ->             16
  15           ->             16

Arne






More information about the Info-vax mailing list