mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-22 07:30:54 +00:00
floating point division by 0.0 is well defined and occasionally used to generate +/- infinite values.
This commit is contained in:
parent
1a2e4772cd
commit
618188c6b2
@ -1199,13 +1199,8 @@ var
|
|||||||
plusch : rop1 := rop1 + rop2; {+}
|
plusch : rop1 := rop1 + rop2; {+}
|
||||||
minusch : rop1 := rop1 - rop2; {-}
|
minusch : rop1 := rop1 - rop2; {-}
|
||||||
asteriskch : rop1 := rop1 * rop2; {*}
|
asteriskch : rop1 := rop1 * rop2; {*}
|
||||||
slashch : begin {/}
|
slashch : rop1 := rop1 / rop2; {/}
|
||||||
if rop2 = 0.0 then begin
|
|
||||||
Error(109);
|
|
||||||
rop2 := 1.0;
|
|
||||||
end; {if}
|
|
||||||
rop1 := rop1 / rop2;
|
|
||||||
end;
|
|
||||||
otherwise : Error(66); {illegal operation}
|
otherwise : Error(66); {illegal operation}
|
||||||
end; {case}
|
end; {case}
|
||||||
if ekind = intconst then begin
|
if ekind = intconst then begin
|
||||||
|
Loading…
Reference in New Issue
Block a user