Re: [dev] libzahl paper

From: Mattias Andrée <>
Date: Tue, 14 Jun 2016 01:03:57 +0200

On Mon, 13 Jun 2016 18:18:39 -0400
Calvin Morrison <> wrote:

> Quote:
> zdivmod Calculates the quotient and the remainder. This
> is available because when you calculate the quotient you
> get the remainder for free. zdiv and zmod simply call
> zdivmod with the dummy variable as one of the output
> variables.
> Why include a wrapper at all? Why not just allow the user
> to access the function directly, allowing them to choose?
> is this just for API use of ease?

On a second read, I'm a little puzzled by your formulation:

  Why include a wrapper at all?
  Why not just allow the user to access the
  function directly, allowing them to choose?

Could you reformulate, preferable with explicit naming
of the functions to avoid confusion?

I first read this as:

  Why include zdiv and zmod at all?
  Why not just make the user call zdivmod
  and discard the unwanted output?

Is this what you meant?

If so, after thinking about it, I think zdiv and zmod
is important for ease of use when you first start using
libzahl. For user's already familiar with libzahl it
doesn't really make a big difference. So it's about
weighting how it is to get started with libzahl and
how much zdiv and zmod contributes too pollution. They
don't really contribute to complexity. My personal
opinion is that ease of getting start out-weights
pollution reduction in this case, but I can be persuaded

For clarity: zdiv, zmod and zdivmod are all available
in the API, and zdiv and zmod are wrappers for zdivmod.

> On 13 June 2016 at 18:10, Staven <> wrote:
> > On Mon, Jun 13, 2016 at 11:32:11PM +0200, Mattias
> > Andrée wrote:
> >> Too energy efficient to open the PDF and
> >> read the abstract? No worries, here it is:
> >
> > You're a good person.
> >
> >

Received on Tue Jun 14 2016 - 01:03:57 CEST

This archive was generated by hypermail 2.3.0 : Tue Jun 14 2016 - 01:12:11 CEST