equal
deleted
inserted
replaced
1140 %{ /* NOCONTEXT */ |
1140 %{ /* NOCONTEXT */ |
1141 |
1141 |
1142 double rslt; |
1142 double rslt; |
1143 OBJ newFloat; |
1143 OBJ newFloat; |
1144 |
1144 |
1145 errno = 0; |
1145 #ifdef WIN32 |
1146 rslt = sqrt(__floatVal(self)); |
1146 if (__floatVal(self) >= 0.0) |
|
1147 #endif |
|
1148 { |
|
1149 errno = 0; |
|
1150 rslt = sqrt(__floatVal(self)); |
1147 #ifdef LINUX /* and maybe others */ |
1151 #ifdef LINUX /* and maybe others */ |
1148 if (! isnan(rslt)) |
1152 if (! isnan(rslt)) |
1149 #endif |
1153 #endif |
1150 if (errno == 0) { |
1154 if (errno == 0) { |
1151 __qMKFLOAT(newFloat, rslt); |
1155 __qMKFLOAT(newFloat, rslt); |
1152 RETURN ( newFloat ); |
1156 RETURN ( newFloat ); |
|
1157 } |
1153 } |
1158 } |
1154 %}. |
1159 %}. |
1155 ^ self class |
1160 ^ self class |
1156 raise:#domainErrorSignal |
1161 raise:#domainErrorSignal |
1157 receiver:self |
1162 receiver:self |
1783 ! ! |
1788 ! ! |
1784 |
1789 |
1785 !Float class methodsFor:'documentation'! |
1790 !Float class methodsFor:'documentation'! |
1786 |
1791 |
1787 version |
1792 version |
1788 ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.85 1998-07-09 08:07:24 cg Exp $' |
1793 ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.86 1998-10-22 18:13:36 cg Exp $' |
1789 ! ! |
1794 ! ! |
1790 Float initialize! |
1795 Float initialize! |