Patashu / break_eternity.js

A Javascript numerical library to represent numbers as large as 10^^1e308 and as small as 10^-10^^1e308. Sequel to break_infinity.js, designed for incremental games.
MIT License
122 stars 46 forks source link

new operator: iteratedlog(payload, base, height) #19

Closed Patashu closed 5 years ago

Patashu commented 5 years ago

if height is integer, apply logb to payload height times, taking the appropriate 'just reduce layer by X' shortcut when payload starts out much larger than base.

if height is real, then apply logb the fractional amount of a time, either at the start or the end, whatever makes for the most realistic operator.

Patashu commented 5 years ago

Might have to ditch the fractional height idea. It doesn't seem like you can do 'half a log'.

log(10;1e20) = 20

log(1.2956555;log(1.2956555;1e20)) = 20.00112885748056229686

but if we take this same base and try it for any other number, it doesn't work:

log(10;1e30) = 30

log(1.2956555;log(1.2956555;1e30)) = 21.5665300001315133154

I'm really feeling my lack of math knowledge here. It's hard to come up with interesting powerful/fractional operators.