-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR adds support for `Float32` and fixes a bug in the runtime.
- Loading branch information
1 parent
c83ce02
commit 633c825
Showing
5 changed files
with
77 additions
and
11 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
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 |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/-- info: 2.100000 -/ | ||
#guard_msgs in | ||
#eval (2.1 : Float32) | ||
|
||
/-- info: 3.200000 -/ | ||
#guard_msgs in | ||
#eval (2.1 : Float32) + 1.1 | ||
|
||
/-- info: 0.900000 -/ | ||
#guard_msgs in | ||
#eval (2.1 : Float32) - 1.2 | ||
|
||
def test1 : IO Unit := do | ||
IO.println ((2 : Float32).sin); | ||
IO.println ((2 : Float32).cos); | ||
IO.println ((2 : Float32).sqrt); | ||
IO.println ((2 : Float32) ^ (100 : Float32)); | ||
|
||
/-- | ||
info: 0.909297 | ||
-0.416147 | ||
1.414214 | ||
1267650600228229401496703205376.000000 | ||
-/ | ||
#guard_msgs in | ||
#eval test1 | ||
|
||
/-- info: 0.909297 -/ | ||
#guard_msgs in | ||
#eval (2 : Float32).sin.toFloat | ||
|
||
/-- info: 0.909297 -/ | ||
#guard_msgs in | ||
#eval (2 : Float).sin.toFloat32 | ||
|
||
/-- info: 1606938044258990275541962092341162602522202993782792835301376.000000 -/ | ||
#guard_msgs in | ||
#eval (2 : Float32).toFloat ^ (200 : Float32).toFloat |