caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Marek Kubica <marek@xivilization.net>
To: Drup <drupyog+caml@zoho.com>
Cc: caml users <caml-list@inria.fr>
Subject: Re: [Caml-list] Divide and print with precision
Date: Wed, 15 Oct 2014 13:13:21 +0200	[thread overview]
Message-ID: <20141015131321.20d5b40a@xivilization.net> (raw)
In-Reply-To: <543E4F48.9080304@zoho.com>

Hello,

On Wed, 15 Oct 2014 12:41:12 +0200
Drup <drupyog+caml@zoho.com> wrote:

> Why do you use Gmp ? Zarith already uses GMP under the hood and you
> can use the Q module for arbitrary precision rationals.

Yes, but I couldn't find a way to print Q.t types as base 10 floating
point approximations with a certain precision.

let third = Q.(//) 1 3;;
hypothetical_print_function ~precision:1000 third;;
0.33333…33333

It might well be that I am completely overlooking something, I'm happy
if someone points me to it.

regards,
Marek

  reply	other threads:[~2014-10-15 11:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-15  9:22 Marek Kubica
2014-10-15 10:41 ` Drup
2014-10-15 11:13   ` Marek Kubica [this message]
2014-10-15 20:25 ` Török Edwin
2014-10-20 21:16   ` Marek Kubica

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141015131321.20d5b40a@xivilization.net \
    --to=marek@xivilization.net \
    --cc=caml-list@inria.fr \
    --cc=drupyog+caml@zoho.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).