* fix simplication of max(double,double) with both values being constants

This commit is contained in:
florian 2024-03-26 23:55:47 +01:00
parent fb3c4ff75b
commit 15398549a4

View File

@ -2980,8 +2980,8 @@ implementation
else if (hp2.nodetype=realconstn) then
begin
{ Both actual parameters are constants, so take
the smaller of the two right now }
if (trealconstnode(hp).value_real < trealconstnode(hp2).value_real) then
the larger of the two right now }
if (trealconstnode(hp).value_real > trealconstnode(hp2).value_real) then
result:=crealconstnode.create(trealconstnode(hp).value_real,resultdef)
else
result:=crealconstnode.create(trealconstnode(hp2).value_real,resultdef)