# MIT License, Copyright (c) 2022 Marvin Borner
# Arbitrary-precision floating-point arithmetic implementation using
#   (+3.14) = pair (+3) (+14)

# This is completely WIP and only intended as a proof of concept

:import std/Combinator .
:import std/Number .
:import std/Pair .

pi (+3) : (+14159)

# generates a float from a normal balanced ternary number
float! \…:… (+0)

# adds two floating numbers
# TODO: Carry support
# - needed: mod, div (?) -> ternary carry != decimal carry
add zip-with …+…