x:0.66 33r50
Actually 0.66 is not exactly 0.66 internally. But it is close enough for J to make it an exact rational. However, I use pennies when handling money. That uses hardware integers. On Tue, Jan 5, 2021 at 8:43 AM Justin Paston-Cooper <paston.coo...@gmail.com> wrote: > Hello, > > I am reading in tab-separated files with readdsv from 'tables/dsv'. > Some columns consist of exact decimal numbers like 6.66. These generally > involve amounts of a decimal currency. These are read in by readdsv as > boxed strings. makenum from 'tables/csv' converts these strings to > floats. I would like these strings to be converted exactly to > rationals. How can I go about this in the easiest and most efficient > way? I could not find information on parsing data types from strings. > > Thanks in advance, > > Justin > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm