Welcome To Darwinbots > Newbie
Need a little help with DB math
Numsgil:
I remember Eric talked about it once, so it wouldn't have surprised me. Mostly I objected to the idea, because floating point is a whole can of worms with how it works.
Botsareus:
That is why I suggest we skip the floating point bull and do the calculations internally:
“Log(a) / Log(b)" means "depow"
“a ^ (1/b)” means "unpow"
a
b
depow
a
b
unpow
This way the result will be an approximate whole but there will be no need for floating points in the DB code.
And yes my names need improvement: I don't think "unpow" and "depow" sounds professional enough.
P.S.
O yea, and I believe this topic belongs in the suggestions forum now...
Thank You for your time...
Numsgil:
I think a general pow term actually isn't a great idea. There's very little need to raise things to powers other than 1/3, 1/2, 2, or 3. So I think a better solution would be to add cbrt, cube, and square commands. Or something along those lines.
Botsareus:
I have already added unpow and depow to my DB source code...
So If my evolved robot uses it I will have to post the vb code I changed. It's two new subs called DNAunpow and DNAdepow. DNA tokenizing and detokenizing was changed. etc.
bacillus:
Just out of curiosity, what were you planning to use this for?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version