Created
October 5, 2023 10:53
-
-
Save run-dlang/ce79e99b75c02fd5ec2547ecfaf6192e to your computer and use it in GitHub Desktop.
Code shared from run.dlang.io.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std; | |
void main() | |
{ | |
real x = 3.14159265358979323846364e300; | |
double y = -3.14159265358979323846364e3000L; | |
float z = -3.14159265358979323846364e30; | |
writefln ("x = %.1g",x); | |
writefln ("y = %.2f",y); | |
writefln ("z = %.19g",z); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment