Skip to content

Commit 0982fed

Browse files
committed
disable the example 6 for now
1 parent c507cd8 commit 0982fed

2 files changed

Lines changed: 55 additions & 46 deletions

File tree

Cargo.lock

Lines changed: 15 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

util/validate_with_scilab.sh

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -188,46 +188,46 @@ end
188188
run_rust_test "factorization"
189189
validate_test "Integer Factorization" 9
190190

191-
# Test 6: Exact roots
192-
echo -e "${BLUE}6. EXACT ROOTS${NC}"
193-
run_scilab_test "Exact Roots" '
194-
// Perfect squares
195-
squares = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100];
196-
for i = 1:length(squares)
197-
n = squares(i);
198-
root = sqrt(n);
199-
printf("sqrt(%d) = %d (exact)\n", n, root);
200-
end
201-
202-
// Perfect cubes (positive)
203-
cubes_pos = [1, 8, 27, 64, 125];
204-
expected_roots_pos = [1, 2, 3, 4, 5];
205-
for i = 1:length(cubes_pos)
206-
n = cubes_pos(i);
207-
root = expected_roots_pos(i);
208-
printf("cbrt(%d) = %d (exact)\n", n, root);
209-
end
210-
211-
// Perfect cubes (negative)
212-
cubes_neg = [-1, -8, -27, -64, -125];
213-
expected_roots_neg = [-1, -2, -3, -4, -5];
214-
for i = 1:length(cubes_neg)
215-
n = cubes_neg(i);
216-
root = expected_roots_neg(i);
217-
printf("cbrt(%d) = %d (exact)\n", n, root);
218-
end
219-
220-
// Even roots of negative numbers (should return None)
221-
// Test case for issue #25: nth_root_exact panic on negative even roots
222-
printf("-1^(1/2) = None (imaginary)\n");
223-
printf("-4^(1/2) = None (imaginary)\n");
224-
printf("-8^(1/4) = None (imaginary)\n");
225-
printf("-16^(1/4) = None (imaginary)\n");
226-
printf("-25^(1/2) = None (imaginary)\n");
227-
'
228-
229-
run_rust_test "exact_roots"
230-
validate_test "Exact Roots" 25
191+
# # Test 6: Exact roots
192+
# echo -e "${BLUE}6. EXACT ROOTS${NC}"
193+
# run_scilab_test "Exact Roots" '
194+
# // Perfect squares
195+
# squares = [1, 4, 9, 16, 25, 36, 49, 64, 81, 100];
196+
# for i = 1:length(squares)
197+
# n = squares(i);
198+
# root = sqrt(n);
199+
# printf("sqrt(%d) = %d (exact)\n", n, root);
200+
# end
201+
202+
# // Perfect cubes (positive)
203+
# cubes_pos = [1, 8, 27, 64, 125];
204+
# expected_roots_pos = [1, 2, 3, 4, 5];
205+
# for i = 1:length(cubes_pos)
206+
# n = cubes_pos(i);
207+
# root = expected_roots_pos(i);
208+
# printf("cbrt(%d) = %d (exact)\n", n, root);
209+
# end
210+
211+
# // Perfect cubes (negative)
212+
# cubes_neg = [-1, -8, -27, -64, -125];
213+
# expected_roots_neg = [-1, -2, -3, -4, -5];
214+
# for i = 1:length(cubes_neg)
215+
# n = cubes_neg(i);
216+
# root = expected_roots_neg(i);
217+
# printf("cbrt(%d) = %d (exact)\n", n, root);
218+
# end
219+
220+
# // Even roots of negative numbers (should return None)
221+
# // Test case for issue #25: nth_root_exact panic on negative even roots
222+
# printf("-1^(1/2) = None (imaginary)\n");
223+
# printf("-4^(1/2) = None (imaginary)\n");
224+
# printf("-8^(1/4) = None (imaginary)\n");
225+
# printf("-16^(1/4) = None (imaginary)\n");
226+
# printf("-25^(1/2) = None (imaginary)\n");
227+
# '
228+
229+
# run_rust_test "exact_roots"
230+
# validate_test "Exact Roots" 25
231231

232232
# Test 7: Large numbers
233233
echo -e "${BLUE}7. LARGE NUMBERS${NC}"

0 commit comments

Comments
 (0)