https://kotlinlang.org logo
#announcements
Title
# announcements
c

christophsturm

10/08/2017, 9:07 AM
must be a very powerful lib if you are using it despite its api
g

groostav

10/09/2017, 4:04 AM
it is, and its also out smarted me.
Microsoft has side-stepped the whole issue of real numbers vs 64-bit representation and the loss of sig-figs by expressing everything as a ratio of two good ol' 32 bit ints. Very clever, and really obnoxious because there isnt a
String.ToIntegerRatio()
function 😕
does anybody know a strategy to convert a decimal number string to its closest ratio? like convert the string "0.5" to the Pair(1, 2)?
b

beholder

10/09/2017, 2:12 PM
Euclidean algorithm, probably