Re: [racket-users] printing decimals

2019-03-15 Thread Laurent
You're probably looking for `real->decimal-string`. Also take a look at ~r instead of ~a, as the former is only for numbers. On Fri, Mar 15, 2019 at 5:57 PM wrote: > Hi all, > > I've been looking through the docs for a way to print decimals to a > defined precision. > > I can get close to what

Re: [racket-users] printing decimals

2019-03-15 Thread sdgudeman
sigh good greif I was being blind its all of a page or so below ~a thank you Jon On Friday, March 15, 2019 at 12:58:58 PM UTC-5, Jon Zeppieri wrote: > > > https://docs.racket-lang.org/reference/strings.html?q=~r#%28def._%28%28lib._racket%2Fformat..rkt%29._~7er%29%29 > > On Fri, Mar 15, 2019 at

Re: [racket-users] printing decimals

2019-03-15 Thread Jon Zeppieri
https://docs.racket-lang.org/reference/strings.html?q=~r#%28def._%28%28lib._racket%2Fformat..rkt%29._~7er%29%29 On Fri, Mar 15, 2019 at 1:57 PM wrote: > Hi all, > > I've been looking through the docs for a way to print decimals to a > defined precision. > > I can get close to what I want using

[racket-users] printing decimals

2019-03-15 Thread sdgudeman
Hi all, I've been looking through the docs for a way to print decimals to a defined precision. I can get close to what I want using something like ~a and giving it a set width without having to build a function to do so. I mean I can build a function to do as its just a bit of string manip