mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Partial pseudo-revert
This commit is contained in:
@@ -1250,7 +1250,10 @@ internal_random_prime :: proc(a: ^Int, size_in_bits: int, trials: int, flags :=
|
|||||||
/*
|
/*
|
||||||
Is it prime?
|
Is it prime?
|
||||||
*/
|
*/
|
||||||
internal_int_is_prime(a, trials) or_return or_continue
|
res := internal_int_is_prime(a, trials) or_return
|
||||||
|
if !res {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if .Safe in flags {
|
if .Safe in flags {
|
||||||
/*
|
/*
|
||||||
@@ -1262,9 +1265,10 @@ internal_random_prime :: proc(a: ^Int, size_in_bits: int, trials: int, flags :=
|
|||||||
/*
|
/*
|
||||||
Is it prime?
|
Is it prime?
|
||||||
*/
|
*/
|
||||||
if internal_int_is_prime(a, trials) or_return {
|
res = internal_int_is_prime(a, trials) or_return
|
||||||
break
|
}
|
||||||
}
|
if res {
|
||||||
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user