-
Notifications
You must be signed in to change notification settings - Fork 413
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3870 from panzone/correct-real-write
Correct real write bug [Patch prepared by @Panzone and reviewed/merged by @mppf] This pull request tries to correct the bug noticed in #2148. It will switch to an exponential notation if the standard precision isn't enough to print the decimal part of the number. Passed test/io and test/release on both linux64 and darwin with default settings. [And passed full local testing]
- Loading branch information
Showing
9 changed files
with
111 additions
and
30 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
var a: real = 1.0; | ||
writeln("a = ", a); | ||
|
||
var b: real = 10.0; | ||
writeln("b = ", b); | ||
|
||
var c: real = 100.0; | ||
writeln("c = ", c); | ||
|
||
var d: real = 1000.0; | ||
writeln("d = ", d); | ||
|
||
var e: real = 10000.0; | ||
writeln("e = ", e); | ||
|
||
var f: real = 100000.0; | ||
writeln("f = ", f); | ||
|
||
var g: real = 1000000.0; | ||
writeln("g = ", g); | ||
|
||
var h: real = 100000.9; | ||
writeln("h = ", h); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
a = 1.0 | ||
b = 10.0 | ||
c = 100.0 | ||
d = 1000.0 | ||
e = 10000.0 | ||
f = 1e+05 | ||
g = 1e+06 | ||
h = 1.00001e+05 |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
x is: 3.14159e+08 | ||
x is: 159265.0 | ||
x is: 1.59265e+05 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
x is: 3.14159e+08 | ||
y is: 3.14159e+08 | ||
x is: 159265.0 | ||
x is: 1.59265e+05 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
x is: 3.14159e+08 | ||
x is: 159265.0 | ||
x is: 1.59265e+05 |
This file contains 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