Str_math scripts

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Judago
Posts: 15
Joined: 04 Nov 2011 07:59

Str_math scripts

#1 Post by Judago » 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.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Str_math scripts

#2 Post by foxidrive » 24 May 2016 06:14

It's nice to see your enjoyment is still hanging in there for batch. :thumbsup:

Judago
Posts: 15
Joined: 04 Nov 2011 07:59

Re: Str_math scripts

#3 Post by Judago » 24 May 2016 06:32

Thanks foxidrive! I still love it, it's just a puzzle to me.

Post Reply