-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change the critical section for tetration/inverses from linear approximation to something more analytical (mostly done!) #22
Comments
now that iteratelog has real height, it should probably get the mirror image of any improvements made here. It also exposes how rough the linear approximation for tetration for real heights is, by demonstrating the patchiness of its inverse. Being off by 0.1 often just changes the result by 0.1 each time, while having huge, dramatic jumps each time you cross past a new integer number of iterations. A good extension of tetration to infinite heights should have a converse iteratedlog that covers the range of results smoothly and continuously as you shift across the fractional heights, IMO. |
So it seems the literature on this stuff is stronger than the last time I looked at it. So the basic rroblem we want to solve is iterating a function a fractional amount of times. https://en.wikipedia.org/wiki/Iterated_function#Fractional_iterates_and_flows,_and_negative_iterate (Related concepts are fractional calculus https://en.wikipedia.org/wiki/Fractional_calculus and fractional hyperoperators.) Naively, there's more than one way to do this - as long as the original constraints of the underlying operator are satisfied then we could define the actual values to be whatever we wanted. So we usually want additional properties on top of it - like being differential, continuous and/or analytical. What would be ideal is if there is only one 'natural' / 'best' way to extend iterated function in general, and that approaches based on similar principles gave the same result as it, further strengthening this proposition. To this end, a very interesting paper exists: http://tetration.org/IF.pdf 'the existence and uniqueness of the Taylor series of iterated functions' Which has this great snippet: 'Fractional iteration[8] can be defined using either Bell[1] and Carleman[3] infinite matrices, taking advantage of the fact that the composition of functions can be performed by matrix multiplication. Once a matrix has been diago- nalized, fractional iterates are found by raising the matrix to the appropriate power.' Pretty promising! The Citizendium page on Tetration is much more filled out than the one on Wikipedia: http://en.citizendium.org/wiki/Tetration And here's some exact analytical continuations for slog/tetration, some of which link to exact values, actual implementations, etc: https://math.eretrandre.org/tetrationforum/showthread.php?tid=1100 links to https://mathoverflow.net/questions/259278/an-explicit-series-representation-for-the-analytic-tetration-with-complex-height and https://gist.githubusercontent.com/VladimirReshetnikov/06d12ab50893850520477a0d99b0278e/raw/3400d283691e59a7a5b366417d0588ea9ec87027/Tetration.nb . It also mentions 'Kneser's solution, a PARI/GP program for which was posted on this forum.' though doesn't link it. Also linked is fatou.gp: http://math.eretrandre.org/tetrationforum/showthread.php?tid=1017 . Schröder's functional equation and Abel's solution are also mentioned a lot, though I'm not sure what they are. We also have http://go.helms-net.de/math/tetdocs/ContinuousfunctionalIteration.pdf and http://mathoverflow.net/q/259467/9550 linked. We also have: http://skysrv.pha.jhu.edu/~neyrinck/extessay.pdf https://web.archive.org/web/20090201164836/http://tetration.itgo.com/paper.html two papers on analytical continuations/approximations for tetration and slog and weak pentation I also looked up fractional hyperoperators for fun, here's some additional stuff about that: https://www.reddit.com/r/math/comments/1l5952/noninteger_hyperoperations/ https://math.stackexchange.com/questions/1350025/hyperoperation-sequence-with-non-integer-values-of-n http://andydude.github.io/tetration/archives/tetration2/hyper.html https://www.hindawi.com/journals/mpe/2016/4356371/ https://math.eretrandre.org/tetrationforum/showthread.php?tid=876 https://www.physicsforums.com/threads/generalization-of-hyperoperations-fractional-operations.485870/ fractional hyperoperators - real, continuous, negative, complex Dream goal would be: hyper(x, h, y), invhyperL(h, y, result), invhyperR(x, h, result), invhyperH(x, y, result) defined for all complex values including 0 and all complex infinities. This would be a superset of all operators except for
|
Ok, aside from still using the linear approximation, I've improved this area a LOT. |
Okay, here's something actually actionable - approximating the analytical section for slog and tetration separately by linear interpolating to the nearest base and nearest 0.1 value. When I feel in the mood to do a bunch of dirty work, I'll give this a try. 1:36 AM] SpectralFlame: heya, I've got Mathematica... whatcha need me to run? Here are the files: https://www.dropbox.com/s/b64l6p3alrk634d/Tetrate_values.txt?dl=0 https://www.dropbox.com/s/biyauons6sxlovs/SLog_values.txt?dl=0 |
finally giving this a real shot today. using some other worked numbers to sanity check myself, helpfully they go to -1.1 and 1.1 (should have asked for this sooner since it really helps me guess check my math, lmao): https://www.researchgate.net/figure/Tetration-F-its-derivative-and-its-inverse-at-the-real-axis_tbl1_242323767 Basically I'm figuring out my tetrate turns the top into e^0.1 when it should be turned into e^^0.1, which is a value in this table! Similarly, slog uses e^0.1 in its critical section but should use e^^0.1 instead. tetrate: 'Instead of ++height and the top becomes the fraction, the top becomes a table lookup.' slog: 'so we go in and do slog_e(1.11211143309340) and I should get 0.1 back out (or very close). |
OKAY! Got everything working except weird edge cases! (for tetration in particular: bases <= 1.5 and negative heights in general. haven't poked at slog edge cases yet) This is exciting. List of unsolved edge cases:
|
Oh neat, I found a javascript implemented complex tetration calculator: http://myweb.astate.edu/wpaulsen/tetcalc/tetcalc.html It doesn't let me pick an arbitrary base (and the reason why is because it has a bunch of pre-calculated values that it doesn't also have the code to calculate). So this is not even something I can dump into my solution, but it lets me get a second opinion on the bases we have in common, and so far so good! It also informs me that e.g. 0.25^^real height is probably NaN (complex number), and by inference same for 0^^real height. I may or may not actually do that, not sure. |
documenting a slight inaccuracy in real height iteratedexp/layeradd10/layeradd: ground truth: Decimal.pow(10, Decimal.pow(10, 9.9)).toString() new Decimal(10).iteratedexp(1.9999999999999, 9.9).toString() so, the only ones that are right are 10.iteratedexp(2, 9.9) and 9.9.layeradd10(2). but like I said, am I just chasing shadows? if I'm using a critical section for slog that isn't innately 100% accurate on its linear approximation, then I'm not actually very far off (just that the slight inaccuracy gets exponentialified). If this is something that'd vanish if my slog critical section is more accurate, then I'm not super worried about it. also of note is this test, which varies the other numbers and shows that the ones that get it wrong are 9.9.layeradd(2, 10), 9.9.layeradd(2, 9.9999999), 9.9000001.layeradd(2, 10), 9.899999.layeradd(2, 10) while everything else is right: new Decimal(10).iteratedexp(2, 9.9).toString() tetrate and slog itself is continuous, e.g. Decimal.tetrate(9, 1.99999999).toString() Decimal.slog(10.5, 10.5).toString() tl;dr I think this is just because slog and tetrate are no longer exact inverses of each other, and if in the future we added more precision the problem would go away |
ok, this is my TODO list is now:
|
OH before I forget, a 5. is that I want to explore if instead of linear interpolation on the tetration critical section, it should be exponential interpolation (e.g. linear on the exponent in layer 1 representation). it might be more accurate for the intermediate heights like .85 and .95, and it might let me clean up/refactor some code for handling <2 and >10 bases |
Another random note to myself (6): I could use the tetration calculator to make the critical sections for 2, e and 10 have more values in them (e.g. 20 or 100). But then when interpolating between bases, it needs to be smart enough to know that different arrays have different sizes. But I think it's possible. But it's probably not worth it unless I also make the slog critical sections bigger. But I could use the tetration calculator to guess-and-check inverses painstakingly. But I probably won't. I could also, as an even crazier idea (7), make the slog critical section an inverse of my tetration critical section, whatever it is. It would be inaccurate for actual slog, but it'd be accurate for my approximation of tetration. And I could automatically generate values using my code. I think first I'd have to decide if I want to change the linear approximation to exponential or not first, though. |
#108 --> several issues were raised and fixed todo list progress: 1-3 are still open, 4 might be fixed but needs double checking, 5 is closed, 6 is open, 7 is closed (superceded by slog iteration algorithm) I'll also throw in an (8) implement continuous pentation and non-integer hyperoperators. I think someone over in https://math.eretrandre.org/tetrationforum/forumdisplay.php?fid=8 has continuous pentation defined, maybe it could be used to define a critical section for pentation? As for non-integer hyperoperators, I think math has not advanced far enough for us to know how this stuff works yet. |
New tetration idea - in the critical section, we can take frac to a power > 1, and this should make it grow slower at first and quicker later, and better match the curve. |
https://www.sligocki.com/2022/06/25/ext-up-notation.html Continuous tetration spotted in the wild, at https://wiki.bbchallenge.org/wiki/BB(6)#CryptidsBus |
two things to do:
handle negative heights. https://en.wikipedia.org/wiki/Tetration#Linear_approximation_for_real_heights has a test case to try.
I also haven't tested fractional heights > 1 yet, because I didn't have a worked example for it. BUT, I think it is okay, because http://mrob.com/pub/math/hyper4.html#real-hyper4 talks about it being defined in the same way I do (add one to the height and pow payload to the fraction). But MROB then goes on to define it in a different way that has higher accuracy for 'small' values (greater than 1, less than 1e1e308) which we could use for such cases if it's easy to implement (but it looks not easy lol)
(we could also try the quadratic approximation. https://en.wikipedia.org/wiki/Tetration#Higher_order_approximations_for_real_heights I'm not sure if it actually gives better accuracy or just makes it differentiable, though. And now that I see MROB's version above, I might actually just use that and skip even trying this?)
The text was updated successfully, but these errors were encountered: