Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let root3 a =
- let rec help x =
- if abs_float(x ** 3. -. a) <= 1e-15 *. abs_float(a) then x
- else help (x +. ( a /. (x ** 2.) -. x) /. 3.)
- in help (if a >= 1. then a /. 3. else a)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement