Jule
Jule copied to clipboard
Cube root function
This pull request adds a new cube root function to the math utilities and documents its inclusion. The main change is the implementation of the cube root calculation for floating-point numbers, along with example usage and thorough testing to ensure correctness.
Math utilities enhancement:
- Added a new
cbrtfunction inmath/cube_root.juleto calculate the cube root of a givenf64value, correctly handling negative inputs. - Included a comprehensive test suite for
cbrt, covering positive, negative, zero, and fractional cases with floating-point tolerance checks. - Provided example usage in the
mainfunction to demonstrate how to use the new cube root function.
Documentation update:
- Added
Cube Rootto the math section ofDIRECTORY.md, listing the new utility for discoverability.