#why isnt this working?
1 messages · Page 1 of 1 (latest)
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
the functions themselves are working well
i will check the current root them
ok i changed nothing and it worked