PLUS+1 User Forum

PLUS+1 Software => Code sharing => Topic started by: Mike on May 06, 2020, 07:24:33 PM

Title: Square Root
Post by: Mike on May 06, 2020, 07:24:33 PM
Wondering if anyone has explored creating a square root that is capable of values larger than 255 one u8. Currently the square root function provided in guide takes a u8 (0-255 decimal) input and outputs the answer to 2 decimal places (multiplied by 100).

I am trying to translate a quadratic line of best fit for psi to mA and need to be able to take the square root of significantly larger values. I've started looking a bit at algorithms and such to do so but it could be time consuming. I may be better off just using a linear line of best fit instead and trying to deal with the error. Possibly having to split my output into multiple lines of best fit.
Title: Re: Square Root
Post by: Mike on May 07, 2020, 12:52:01 AM
Misunderstood the description page. It does accept up to U32's as an input. Just does not deal with negatives (tough for a virtual machine to imagine things and all)