-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
167 additions
and
38 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,11 @@ | ||
skibidi main { | ||
chad epsilon = 1.0e-7; | ||
chad a = 1.0; | ||
chad b = 0.9999999; | ||
edgy (a - b < epsilon) { | ||
yappin("%d\n", yes); 🚽 Should output: 1 | ||
} amogus { | ||
yappin("%d\n", no); | ||
} | ||
bussin 0; | ||
} |
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,10 @@ | ||
skibidi main { | ||
chad f = 0.0; | ||
gigachad d = 0.0; | ||
rizz i = 0; | ||
yappin("%f\n", 1.0 / f); 🚽 Should output: inf | ||
yappin("%f\n", f / f); 🚽 Should output: nan | ||
yappin("%f\n", d / 0.0); 🚽 Should output: inf | ||
yapping("%d\n", 1 / i); 🚽 Should output: Error: Division by zero | ||
bussin 0; | ||
} |
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,10 @@ | ||
skibidi main { | ||
chad f = 16777216.0; | ||
gigachad d = 16777216.0; | ||
chad f1 = f + 1.0; | ||
gigachad d1 = d + 1.0; | ||
yappin("%.1f %.1f\n", f1 - f, d1 - d); | ||
🚽 Should output: 0.0 1.0 | ||
🚽 (float loses precision, double maintains it) | ||
bussin 0; | ||
} |
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,7 @@ | ||
skibidi main { | ||
chad tiny = 1.175494351e-38; 🚽 FLT_MIN | ||
chad big = 3.402823466e+38; 🚽 FLT_MAX | ||
chad sum = big + tiny; | ||
yappin("%f\n", sum - big); 🚽 Should output: 0.000000 (precision loss) | ||
bussin 0; | ||
} |
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,7 @@ | ||
skibidi main { | ||
rizz max = 2147483647; 🚽 INT_MAX | ||
rizz min = -2147483648; 🚽 INT_MIN | ||
yappin("%d\n", max + 1); 🚽 Should output: -2147483648 (overflow) | ||
yappin("%d\n", min - 1); 🚽 Should output: 2147483647 (underflow) | ||
bussin 0; | ||
} |
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,9 @@ | ||
skibidi main { | ||
chad f = 3.14; | ||
gigachad d = 3.14; | ||
rizz i = 42; | ||
nonut rizz u = 42; | ||
yappin("%f\n", f * i); 🚽 Should output: 131.880000 | ||
yappin("%f\n", d * u); 🚽 Should output: 131.880000 | ||
bussin 0; | ||
} |
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,9 @@ | ||
skibidi main { | ||
rizz a = -5; | ||
rizz b = 3; | ||
yappin("%d\n", a % b); 🚽 Should output: -2 | ||
nonut rizz x = 5; | ||
nonut rizz y = 3; | ||
yappin("%u\n", x % y); 🚽 Should output: 2 | ||
bussin 0; | ||
} |
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,7 @@ | ||
skibidi main { | ||
chad f = 1.23e-7; | ||
gigachad d = 1.23e-15; | ||
yappin("%e\n", f); 🚽 Should output: 1.230000e-07 | ||
yappin("%e\n", d); 🚽 Should output: 1.230000e-15 | ||
bussin 0; | ||
} |
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 @@ | ||
skibidi main { | ||
chad huge_float = 3.4e38; | ||
rizz converted = huge_float; 🚽 Should be INT_MAX or error | ||
gigachad precise = 123456789.123456789; | ||
chad less_precise = precise; 🚽 Precision loss | ||
yappin("%f\n", less_precise); 🚽 Should output: 123456789.000000 | ||
bussin 0; | ||
} |
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,6 @@ | ||
skibidi main { | ||
nonut rizz big = 4294967295; 🚽 UINT_MAX | ||
yappin("%u\n", big + 1); 🚽 Should output: 0 (wrap around) | ||
yappin("%u\n", big * 2); 🚽 Should output: 4294967294 (wrap around) | ||
bussin 0; | ||
} |
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,17 +1,27 @@ | ||
{ | ||
"boolean.brainrot": "It's valid!\nno\nyes\n", | ||
"fizz_buzz.brainrot": "1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\nBuzz\n", | ||
"hello_world.brainrot": "Hello, World!\n", | ||
"sizeof.brainrot": "4\n4\n1\n", | ||
"char.brainrot": "c\n", | ||
"float.brainrot": "3.141592\n", | ||
"modulo.brainrot": "2\n", | ||
"switch_case.brainrot": "You chose 2, gigachad move!\n", | ||
"circle_area.brainrot": "78.540\n", | ||
"circle_area_double.brainrot": "78.539800\n", | ||
"for_loop.brainrot": "Skibidi toilet\nSkibidi toilet\nSkibidi toilet\nSkibidi toilet\nSkibidi toilet\nSkibidi toilet\n", | ||
"output_error.brainrot": "you sussy baka!", | ||
"while_loop.brainrot": "AAAAAH A GOONIN LOOP\n1\nAAAAAH A GOONIN LOOP\n2\nAAAAAH A GOONIN LOOP\n3\nAAAAAH A GOONIN LOOP\n4\n", | ||
"int.brainrot": "10\n5\n3\n-3\n20\n-20\n2\n1\n2\n-2", | ||
"uint.brainrot": "10\n9931737\n3\n647238965\n20\n245413032\n2\n1\n2\n1" | ||
"comparison_edge_case": "1\n", | ||
"division_edge_cases": "inf\nnan\ninf\nError: Division by zero\n", | ||
"double_vs_float": "0.0 1.0\n", | ||
"float_precision": "0.000000\n", | ||
"integer_overflow": "-2147483648\n2147483647\n", | ||
"mixed_types": "131.880000\n131.880000\n", | ||
"modulo_edge_case": "-2\n2\n", | ||
"scientific_notation": "1.230000e-07\n1.230000e-15\n", | ||
"type_conversion": "123456789.123457\n", | ||
"unsigned_integer_wrap": "0\n4294967294\n", | ||
"boolean": "It's valid!\nno\nyes\n", | ||
"fizz_buzz": "1\n2\nFizz\n4\nBuzz\nFizz\n7\n8\nFizz\nBuzz\n", | ||
"hello_world": "Hello, World!\n", | ||
"sizeof": "4\n4\n1\n", | ||
"char": "c\n", | ||
"float": "3.141592\n", | ||
"modulo": "2\n", | ||
"switch_case": "You chose 2, gigachad move!\n", | ||
"circle_area": "78.540\n", | ||
"circle_area_double": "78.539800\n", | ||
"for_loop": "Skibidi toilet\nSkibidi toilet\nSkibidi toilet\nSkibidi toilet\nSkibidi toilet\nSkibidi toilet\n", | ||
"output_error": "you sussy baka!", | ||
"while_loop": "AAAAAH A GOONIN LOOP\n1\nAAAAAH A GOONIN LOOP\n2\nAAAAAH A GOONIN LOOP\n3\nAAAAAH A GOONIN LOOP\n4\n", | ||
"int": "10\n5\n3\n-3\n20\n-20\n2\n1\n2\n-2", | ||
"uint": "10\n9931737\n3\n647238965\n20\n245413032\n2\n1\n2\n1" | ||
} |
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