j
jaipkg.dev
packages / library / jai-cbrt

jai-cbrt

9f48382library

A jai implementation of cube root algorithm

MIT · updated 4 months ago

jai-cbrt

This is a jai port of cube root algorithm from fdlibm library.

Why?

At the time I'm writing this, there's no cube root routine in jai standard library. I found out about the algorithm from Golang standard library.

An alternative algorithm is from cephes math library. Actually, jai standard library has some routines ported from cephes. But I didn't realize about the existance of cephes until much later.

Usage

Just copy-paste the code (don't forget to copy the license notice), or use it as a module.

#import "jai-cbrt"

x := cbrt(10.8);