From 06fb5aceeb65a75b1cd643debd667c52fdcafcb9 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Sun, 8 Nov 2026 14:10:02 -0800 Subject: Better error messages Better error messages. Buffs to the std lib; getch() to fetch a single character; streaming I/O handles retries, and large sizes, with better error reporting. Formatted strings. Default int moved to i32. TicTacToe, the game. --- .../src/test/java/com/seaofnodes/simple/Chapter14FloatTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'chapter30/src/test/java/com/seaofnodes/simple/Chapter14FloatTest.java') diff --git a/chapter30/src/test/java/com/seaofnodes/simple/Chapter14FloatTest.java b/chapter30/src/test/java/com/seaofnodes/simple/Chapter14FloatTest.java index e058a822..9a3bb87a 100644 --- a/chapter30/src/test/java/com/seaofnodes/simple/Chapter14FloatTest.java +++ b/chapter30/src/test/java/com/seaofnodes/simple/Chapter14FloatTest.java @@ -12,8 +12,10 @@ public class Chapter14FloatTest { {"int rounded=arg/2.5; return rounded;", "6", "-6"}, {"int rounded=0; rounded=arg/2.5; return rounded;", "6", "-6"}, {"i8 rounded=arg*16.0; return rounded;", "16", "-16"}, - {"int rounded=1e100; return rounded;", "9223372036854775807", "9223372036854775807"}, - {"int rounded=-1e100; return rounded;", "-9223372036854775808", "-9223372036854775808"}, + {"int rounded=1e100; return rounded;", "-1", "-1"}, + {"int rounded=-1e100; return rounded;", "0", "0"}, + {"i64 rounded=1e100; return rounded;", "9223372036854775807", "9223372036854775807"}, + {"i64 rounded=-1e100; return rounded;", "-9223372036854775808", "-9223372036854775808"}, {"int rounded=1e300*1e300-1e300*1e300; return rounded;", "0", "0"}, {"f32 rounded=arg+16777216.0; return rounded;", "1.6777232E7", "1.6777199E7"} }; -- cgit v1.2.3