feat: implement complex sqrt
All checks were successful
/ test (pull_request) Successful in 18s

This commit is contained in:
Glen Whitney 2025-04-28 09:26:35 -07:00
parent bc8c2ff7fb
commit 196571ae13
9 changed files with 212 additions and 31 deletions

View file

@ -88,6 +88,12 @@ export const larger = match([Any, Any], (math, [T, U]) => {
return boolnum((t, u) => !eq(t, u) && bigger(t, u))(math)
})
export const isPositive = match(Any, (math, T) => {
const zero = math.zero(T)
const larger = math.larger.resolve([T, T])
return boolnum(t => larger(t, zero))
})
export const largerEq = match([Any, Any], (math, [T, U]) => {
const eq = math.equal.resolve([T, U])
const bigger = math.exceeds.resolve([T, U])