This repository was archived by the owner on Oct 12, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -219,10 +219,18 @@ T toPrec(T:real)(real f) { pragma(inline, false); return f; }
219
219
r = toPrec! real (d + d);
220
220
r = toPrec! real (r + r);
221
221
222
- /+ Uncomment these once compiler support has been added.
223
222
enum real PIR = 0xc .90fdaa22168c235p- 2 ;
224
223
enum double PID = 0x1 .921fb54442d18p+ 1 ;
225
224
enum float PIF = 0x1 .921fb6p+ 1 ;
225
+ static assert (toPrec! float (PIR ) == PIF );
226
+ static assert (toPrec! double (PIR ) == PID );
227
+ static assert (toPrec! real (PIR ) == PIR );
228
+ static assert (toPrec! float (PID ) == PIF );
229
+ static assert (toPrec! double (PID ) == PID );
230
+ static assert (toPrec! real (PID ) == PID );
231
+ static assert (toPrec! float (PIF ) == PIF );
232
+ static assert (toPrec! double (PIF ) == PIF );
233
+ static assert (toPrec! real (PIF ) == PIF );
226
234
227
235
assert (toPrec! float (PIR ) == PIF );
228
236
assert (toPrec! double (PIR ) == PID );
@@ -233,5 +241,4 @@ T toPrec(T:real)(real f) { pragma(inline, false); return f; }
233
241
assert (toPrec! float (PIF ) == PIF );
234
242
assert (toPrec! double (PIF ) == PIF );
235
243
assert (toPrec! real (PIF ) == PIF );
236
- +/
237
244
}
You can’t perform that action at this time.
0 commit comments