Continued fraction/Arithmetic/G(matrix ng, continued fraction n): Difference between revisions
Continued fraction/Arithmetic/G(matrix ng, continued fraction n) (view source)
Revision as of 13:18, 22 February 2023
, 1 year ago→Using linear types
Line 834:
===Using linear types===
This method of implementation purposely avoids the need for a garbage collector, and should be safe against the possibility of a memory leak. It does not memoize results, however. Memoization could be added, but effective ''safe'' use of it might require a host of other features, such as "generator splitters" or reference counting. By ''safe'' I mean safe against memory leaks and double-freeing. These are issues that do not arise in a program with garbage collection.
The demo program outputs LuaTeX macro code (for plain TeX, not LaTeX).
|