[ANN] high-precision mathematical library

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

[ANN] high-precision mathematical library

Luiz Henrique de Figueiredo
Following the recent (but silent) updates of my mathematical libraries for Lua,
I've written a high-precision mathematical library:
        http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/#lqd

lqd uses 32-byte, quad-double numbers (approx. 64 decimal digits), but it
also supports 16-byte, double-double numbers (approx. 32 decimal digits).
(So, lqd is high-precision but not arbitrary-precision like lbc and lmapm.)
The functions available in lqd are listed at the end of this message.

lqd is based on the qd library available at
        http://crd.lbl.gov/~dhbailey/mpdist/
       
qd is licensed under the terms of the BSD license.

All feedback welcome. Enjoy.
--lhf

-------------------------------------------------------------------------------

qd library:
 __add(x,y) atan2(y,x) number(x)
 __div(x,y) atanh(x) pi
 __eq(x,y) ceil(x) rand()
 __lt(x,y) compare(x,y) sin(x)
 __mod(x,y) cos(x) sincos(x)
 __mul(x,y) cosh(x) sincosh(x)
 __pow(x,y) debug(x) sinh(x)
 __sub(x,y) digits([n]) sqr(x)
 __tostring(x) div(x,y) sqrt(x)
 __unm(x) exp(x) sub(x,y)
 abs(x) floor(x) tan(x)
 acos(x) ipow(x,n) tanh(x)
 acosh(x) iroot(x,n) tonumber(x)
 add(x,y) log(x) tostring(x,[n])
 asin(x) log10(x) version
 asinh(x) mul(x,y)
 atan(x) neg(x)

-------------------------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] high-precision mathematical library

Miles Bader-2
Luiz Henrique de Figueiredo <[hidden email]> writes:
> lqd is based on the qd library available at
> http://crd.lbl.gov/~dhbailey/mpdist/
>
> qd is licensed under the terms of the BSD license.

I noticed that the web-page you referenced above says the following:

   This software is provided for research use only.  Incorporating this
   software in any commercial product requires a license agreement.

(i.e., very much not the BSD license) but the qd tar bundle itself
("qd-2.3.7.tar.gz") contains a "COPYING" file with the BSD license.

Kind of confusing...

-Miles

--
Ocean, n. A body of water covering seven-tenths of a world designed for Man -
who has no gills.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] high-precision mathematical library

Luiz Henrique de Figueiredo
> I noticed that the web-page you referenced above says the following:
>
>    This software is provided for research use only.  Incorporating this
>    software in any commercial product requires a license agreement.
>
> (i.e., very much not the BSD license) but the qd tar bundle itself
> ("qd-2.3.7.tar.gz") contains a "COPYING" file with the BSD license.
>
> Kind of confusing...

Yes, definitely confusing. I'm sorry for the noise: I only checked COPYING.
I'd guess that file overides the statement in the web page, but I'm no lawyer.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] high-precision mathematical library

KHMan
Luiz Henrique de Figueiredo wrote:

>> I noticed that the web-page you referenced above says the following:
>>
>>    This software is provided for research use only.  Incorporating this
>>    software in any commercial product requires a license agreement.
>>
>> (i.e., very much not the BSD license) but the qd tar bundle itself
>> ("qd-2.3.7.tar.gz") contains a "COPYING" file with the BSD license.
>>
>> Kind of confusing...
>
> Yes, definitely confusing. I'm sorry for the noise: I only checked COPYING.
> I'd guess that file overides the statement in the web page, but I'm no lawyer.

Without any *absolutely* *clear* clarification, I would have to
conclude that they have dreams of commercializing it, and the
license in the distribution is not an accurate representation of
their intentions.

Rather unfortunate, a bunch of academics (from Lawrence Berkeley
National Laboratory, no less!) who are clueless about licensing
issues, or LBNL wants the cake and eat it too. It just totally
kills my trust in their competence in licensing matters. It
follows that I for one would stay very very far away from what
these guys are giving out. Note that you might get an okay from
them and later that may get overriden by a beancounter higher up.

The correct way would be to do what the lcc people do:
http://drh.svnrepository.com/svn/lcc/tags/v4_2/CPYRIGHT

A most unfortunate state of affairs, indeed.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] high-precision mathematical library

Miles Bader-2
KHMan <[hidden email]> writes:
> Rather unfortunate, a bunch of academics (from Lawrence Berkeley
> National Laboratory, no less!) who are clueless about licensing issues,
> or LBNL wants the cake and eat it too. It just totally kills my trust in
> their competence in licensing matters. It follows that I for one would
> stay very very far away from what these guys are giving out. Note that
> you might get an okay from them and later that may get overriden by a
> beancounter higher up.

Er, well as a first step, it seems reasonable to just ask the package
author what's up.

I think people tend to be more careful when making the package itself
than when making the web page (it doesn't seem unlikely that they just
stuck it on a existing web page, which may have had license wording
describing the older packages there ... or they forgot to update the web
page after changing the license ... or they just grabbed a web page
template from someone else, or ...).

[It seems fairly common in academia to use FOSS licenses now where they
used something weirder in the past.]

-Miles

--
Suburbia: where they tear out the trees and then name streets after them.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] high-precision mathematical library

Miles Bader-2
In reply to this post by KHMan
KHMan <[hidden email]> writes:
> The correct way would be to do what the lcc people do:
> http://drh.svnrepository.com/svn/lcc/tags/v4_2/CPYRIGHT

p.s., Why is the lcc approach more "correct"?  The package in question
_has_ a COPYING file (with a less obnoxious license than lcc).

-Miles

--
XML is like violence.  If it doesn't solve your problem, you're not
using enough of it.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] high-precision mathematical library

KHMan
Miles Bader wrote:
> KHMan <[hidden email]> writes:
>> The correct way would be to do what the lcc people do:
>> http://drh.svnrepository.com/svn/lcc/tags/v4_2/CPYRIGHT
>
> p.s., Why is the lcc approach more "correct"?  The package in question
> _has_ a COPYING file (with a less obnoxious license than lcc).

It is in context of how the "commercialization intent" is handled.
Let us disregard for a moment that I agree open licenses is the
most beneficial to all in the case of such libraries.

Now, if the *intent* is to control access to commercial usage,
then lcc has got it right. It is meant to allow broad usage in
academia, while controlling commercial usage. And the license made
that crystal clear, and it has always been so.

That's clarity of thought there.

But, to respond to your other posting, yes, I sounded harsh, but
let me explain. One, the website is up to date and seems well
maintained. Two, see this part of the package's page:

     "This software is provided for research use only.
     Incorporating this software in any commercial product
     requires a license agreement. This software is not warranted
     by the authors, the University of California or the Lawrence
     Berkeley National Laboratory."

"This software is not warranted" seems to be expressed as the BSD
license. But yet, they say, "for research use only". This is very
much like the intent of lcc, which may be called "for academic
use". And they reinforce this with the second sentence, which
implies that they want explicit one-to-one license agreements for
commercial usage.

So, I stand by the impressions I got. The *intent* of the authors
is important. I read in this case that the intent is "for research
use only". For whatever reason, I think the BSD license in the
package is not telling the whole story. Of course, it would be
nice to get it clarified, but the feeling I have is that it may be
part of a trend in US labs and academia to monetize or control IP
rights, especially patent rights.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] high-precision mathematical library

Martin Schröder-2
2009/4/14, KHMan <[hidden email]>:
> Miles Bader wrote:
> > KHMan <[hidden email]> writes:
> > > The correct way would be to do what the lcc people do:
> > > http://drh.svnrepository.com/svn/lcc/tags/v4_2/CPYRIGHT
> >
> > p.s., Why is the lcc approach more "correct"?  The package in question
> > _has_ a COPYING file (with a less obnoxious license than lcc).

It is not. Inventing a new license is almost always wrong.

>  It is in context of how the "commercialization intent" is handled. Let us
> disregard for a moment that I agree open licenses is the most beneficial to
> all in the case of such libraries.

This is not what the tarball says. The distribution is the tarball -
I think we can (legally) disregard any statemnts elsewhere. The
tarball has a COPYING (BSD), but the source files have no license
statement, just a (c). This is broken: AFAIK all files should state
the license.

Best
   Martin
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] high-precision mathematical library

KHMan
Martin Schröder wrote:

> 2009/4/14, KHMan <...>:
>> Miles Bader wrote:
>>> KHMan <...> writes:
> [snip snip]
>>  It is in context of how the "commercialization intent" is handled. Let us
>> disregard for a moment that I agree open licenses is the most beneficial to
>> all in the case of such libraries.
>
> This is not what the tarball says. The distribution is the tarball -
> I think we can (legally) disregard any statemnts elsewhere.
> [snip snip]

:-) :-) If you think the above, well... I prefer to err on the
side of caution. In a nutshell, my argument is that I cannot
simply dismiss a clear assertion of policy on an up-to-date web
page of the library package in question. Therefore, I cannot make
definitive conclusions about its licensing using only the COPYING
file alone (which you point out is not explicitly tied to the
sources using the usual copyright declaration comment blocks.)

Or, put it like this: I think we cannot download the package
without going to that page. That page has clear licensing policy
assertions. Is it like click-wrap licensing? That would be for a
judge to decide. Does the unmarked sources mean that we cannot
disregard licensing policy other than what is stated in the
COPYING file? Did the authors assert that the text of COPYING
represents the licensing policy of the source code? Well, nothing
is clear, except that to solve this, we'd have to clarify the
whole thing with the authors.

I partly agree with the scenario Miles mentioned. Remember, it
could be that the license was changed from some-restrictions to
BSD, and the website was not updated. But it could also be that
the license was changed from BSD to some-restrictions and the
authors did not update the package to reflect new organization
policy, thus leaving the ambiguity hanging out there.

Of course, all of this could be solved by a simple query. But
given the information presented thus far, the status of the
library is far from clear. I've said too much already, so I'll
leave this thread to others.

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] high-precision mathematical library

Miles Bader-2
KHMan <[hidden email]> writes:
> Or, put it like this: I think we cannot download the package without
> going to that page.

You can certainly download it without reading the page:

   http://crd.lbl.gov/~dhbailey/mpdist/qd-2.3.7.tar.gz

> Does the unmarked sources mean that we cannot disregard licensing
> policy other than what is stated in the COPYING file? Did the authors
> assert that the text of COPYING represents the licensing policy of the
> source code?

The README file does say:

   This work was supported by the Director, Office of Science, Division
   of Mathematical, Information, and Computational Sciences of the
   U.S. Department of Energy under contract number DE-AC02-05CH11231.

   See the file COPYING for license information.

[Unfortunately, it seems all too possible that the institution _does_
have "gimme money" rules in place, and the authors used the BSD license
because it's common and didn't really think too much about the issue...]

-Miles

--
Road, n. A strip of land along which one may pass from where it is too
tiresome to be to where it is futile to go.
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] high-precision mathematical library

KHMan
Miles Bader wrote:
> KHMan <...> writes:
>> Or, put it like this: I think we cannot download the package without
>> going to that page.
>
> You can certainly download it without reading the page:
>
>    http://crd.lbl.gov/~dhbailey/mpdist/qd-2.3.7.tar.gz

:-) Sorry, obviously I meant that the author(s) might have
intended that people getting the package would see and read and
understand the contents of the web page. And some people might
assume that visitors will land on the web page via a search. It's
a faulty assumption, but not unreasonable.

Of course, there are many ways of circumventing that, but from a
paranoid layman's point of view, it would be unwise to dismiss the
contents of the web page just because it has been circumvented --
the tone of the licensing assertions sounded deadly serious.

(Yes, I know this is like the blogger who let her cat accept the
EULA, but whether that is valid or not would have to depend on how
the judge interprets the law. (Again, a vast oversimplification,
but you get the idea.))

>> [snip]
> [snip]

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] high-precision mathematical library

Luiz Henrique de Figueiredo
In reply to this post by Miles Bader-2
> Er, well as a first step, it seems reasonable to just ask the package
> author what's up.

Well, I did, and here is the reply:

        We will redo the text at some point, but it is true that
        commercial product usage requires a license agreement.

Too bad. :-(
--lhf
Reply | Threaded
Open this post in threaded view
|

Re: [ANN] high-precision mathematical library

David Kastrup
In reply to this post by Martin Schröder-2
Martin Schröder <[hidden email]> writes:

> 2009/4/14, KHMan <[hidden email]>:
>
>>  It is in context of how the "commercialization intent" is
>> handled. Let us disregard for a moment that I agree open licenses is
>> the most beneficial to all in the case of such libraries.
>
> This is not what the tarball says. The distribution is the tarball - I
> think we can (legally) disregard any statemnts elsewhere.

If the tarball can reasonably accessed only by getting to know some
license intent, I would not say so.  A license is what governs the
agreement between the parties when a copy is received.  It need not be
in writing.  The presence of files in the tarball means little enough.

It may be a defense when a court tries determining intent, damages and
consequences.  Obviously, if a copyright holder wants to sue, he better
not give the plaintiffs a reasonable excuse why they could have assumed
a certain license.

But that does not mean that a court will in effect rule that copyright
must not be asserted when a certain file was kept accidentally in some
distribution.  Even if the court does not award damages, redistribution
would likely have to stop.

> The tarball has a COPYING (BSD), but the source files have no license
> statement, just a (c). This is broken: AFAIK all files should state
> the license.

That's more informative, certainly.

--
David Kastrup