#why isnt this working?

1 messages · Page 1 of 1 (latest)

shy wharf
#

clearly either primenums returns an empty array or currentroot is never an integer

#

you should test if a number is an integer by doing mod(x, 1) < 2 * eps(Float32) instead of checking the type

#

also a better pattern would be to have root return a tuple that is a bool and the root, if the bool is true it was found if false then you can discard the second result

#

that way it is type stable

hallow quest
#

i will check the current root them

hallow quest
#

ok i changed nothing and it worked