lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Scheme conversion inexact->exact question


From: Abraham Lee
Subject: Scheme conversion inexact->exact question
Date: Tue, 12 Jul 2016 13:27:23 -0600

Does anyone have a solution for the occasional HUGE integers that can be created for the numerator/denominator when using inexact->exact?

For example,

(inexact->exact 0.2)

yields

3602879701896400/18014398509482000

It is correct, but LP doesn't seem to want to deal with such large integers, at least for me. Can this be reduced to 1/5 somehow? Is there a better way to get a rational from a decimal? I can write a crazy function that procedurally determines the minimum power of 10 that gives me a rational with smaller numbers, but I'd rather not. Any advice is very welcome.

--
Abraham Lee

reply via email to

[Prev in Thread] Current Thread [Next in Thread]