Yes, I think it would be pretty easy to implement fractions. The
main nontrivial function you need to do it is here:
https://github.com/revarbat/BOSL2/wiki/math.scad#function-gcd
On Sun, Aug 14, 2022 at 8:01 PM William F. Adams via Discuss
discuss@lists.openscad.org wrote:
---------- Forwarded message ----------
From: "William F. Adams" willadams@aol.com
To: "discuss@lists.openscad.org" discuss@lists.openscad.org
Cc:
Bcc:
Date: Mon, 15 Aug 2022 00:00:03 +0000 (UTC)
Subject: [OpenSCAD] Re: Floating point error challenge
Would it be feasible to implement something like the fraction module for Python in OpenSCAD?
https://docs.python.org/3/library/fractions.html
(I think that's the right link --- it was mentioned in a discussion of a text interface where splitting the screen was an option and the developer found that using this module allowed splits to occur as expected)
William
---------- Forwarded message ----------
From: "William F. Adams via Discuss" discuss@lists.openscad.org
To: "discuss@lists.openscad.org" discuss@lists.openscad.org
Cc: "William F. Adams" willadams@aol.com
Bcc:
Date: Mon, 15 Aug 2022 00:00:03 +0000 (UTC)
Subject: [OpenSCAD] Re: Floating point error challenge
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org