Jule icon indicating copy to clipboard operation
Jule copied to clipboard

Cube root function

Open ITZ-NIHALPATEL opened this issue 2 months ago • 0 comments

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 cbrt function in math/cube_root.jule to calculate the cube root of a given f64 value, 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 main function to demonstrate how to use the new cube root function.

Documentation update:

  • Added Cube Root to the math section of DIRECTORY.md, listing the new utility for discoverability.

ITZ-NIHALPATEL avatar Oct 25 '25 15:10 ITZ-NIHALPATEL