Str_math scripts
Posted: 24 May 2016 01:55
I'm not sure if anyone is interested, but I have updated my str_math.bat along with the bash version.
I added exponents, though huge exponents are slow and may hit memory limits for obvious reasons. I haven't extensively tested, but the testing I have done seems to be ok. I'm testing on a xp version of cmd.exe so anything could be going on elsewhere. Fractional exponents aren't supported, because I haven't done a sqrt function yet and I'm not sure if I will. Negatives are ok, but sometimes need the decimal places input to return non-zero.
I'm not sure If there was a better way to do it, right now it squares the base and halves the power until the last square is done, saving a list of odds to multiply by at the end.
If anyone has some ideas, or finds any problems let me know.
I added exponents, though huge exponents are slow and may hit memory limits for obvious reasons. I haven't extensively tested, but the testing I have done seems to be ok. I'm testing on a xp version of cmd.exe so anything could be going on elsewhere. Fractional exponents aren't supported, because I haven't done a sqrt function yet and I'm not sure if I will. Negatives are ok, but sometimes need the decimal places input to return non-zero.
I'm not sure If there was a better way to do it, right now it squares the base and halves the power until the last square is done, saving a list of odds to multiply by at the end.
If anyone has some ideas, or finds any problems let me know.