A micro-sized, float math library in pure POSIX sh
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
thatgeekyweeb 49c83f271e things seem to be working correctly most of the time; but some numbers are still broke; IE: 0.5 and 83488.99 1 week ago
refractor things seem to be working correctly most of the time; but some numbers are still broke; IE: 0.5 and 83488.99 1 week ago
tests squashed the overflow bug ,,, also made a new one ... WIP STILL... duh... 2 weeks ago
README refractoring... WIP 3 weeks ago
floatm things seem to be working correctly most of the time; but some numbers are still broke; IE: 0.5 and 83488.99 1 week ago
studdy refractoring... WIP 3 weeks ago

README

---
# Purpose
-- The purpose of this script and the pain I have endured creating it are to make bc redundant within POSIX sh
-- The one thing bc can do that POSIX sh arithmetic cannot is float math
---
# References
-- This/These script(s) make(s) use of several different lectures and outside convertors
-- See ./studdy for links to these
---
# Current status
-- Conversion algorithms are WorkInProgress's and may be inaccurate, flat out wrong
-- Or use weird shell hacks
---
# Testing
-- I know that everything is broken, and I plan to fix it
-- However; if you want to see it in action and not open a billion issues
-- Do the following
```
$ dash ./floatm '7.66'
# expected output is 0 10000001 11101010001111010111000
$ dash ./floatm '0 10000001 11101010001111010111000'
# expected output is ~7.66 - 7.65973625176
```
-- Addtionally unit tests cant be found in ./tests/
---
# Caveats
-- This is likely to be inaccurate as decimals are force shortened to 11 charecters
-- This is to prevent issues with outside shells not support numbers 23 digits long
-- Additonally I abuse this to test if the length/value of integers has "overflowed"
----
-- sh was never meant to work with floats.
-- Please, for the sake of all that is good, DO NOT USE THIS
-- This is a proof of concept, and works ionly if your lucky
-- and your sh imp actually supports numbers this big