Implementation of functions in math.h on clc-wiki

P

P.J. Plauger

You _did_ suggest that you owned the idea of using a common function
with those particular side-effects and return values to implement a
floor and ceil function.

Really? What I said was:

: For all its brevity, this is a remarkably telling example of the
: distinct worth of a particular implementation. _Dint is indeed my
: own invention, evolved over several decades of writing portable
: and efficient math functions. It is *not* simply a C implementation
: of an old Fortran function, despite the similarity of names. Note
: that it takes a second argument.

So I claim credit for inventing it. Absent a patent (for which I
didn't file) there's no hint of ownership in that statement, IMO.
I think of all the people who claim to have invented various
concepts in the C++ Standard; none of them were accused of claiming
ownership of any keywords as a result of their invention.

Further down in that post, I also said:

: I consider _Dint one of the more valuable components of the
: Standard C library that I originally wrote and that is now
: being licensed by my company, Dinkumware, Ltd. (my
: principal source of income for the past decade or so). I
: don't take lightly the notion that it can be copied and
: used verbatim in ways that took me quite some time to
: work out.

Please note the emphasis on verbatim copying, which is indeed
the stuff of copyright protection. I see no other claim beyond
that.

If I've missed a quote that can be construed as a claim of
"idea ownership" I'd appreciate having it pointed out to me.
Owning "ideas" is outside of copyright law.

Yeah, I think I pointed that out once or twice myself. But
thanks for reminding me.
You
can own the specific token sequences implementing each function, but you
seem to think you own the idea of having a third function that works in
a particular way to do most of the work that is shared in common between
floor() and ceil().

No, *you* seem to think I think that. What I observed, and provided
some supporting evidence for, was that writing ceil in terms of such
a utility function was a particularly unique expression, and hence
well covered by copyright law for all its brevity. And I pointed out
that the particular copying involved not just the concept of such a
function but its name, argument types, argument order, and return
codes. I invented it, first wrote it down, copyrighted it, and derive
value from it. Those are all damn good reasons for me to object even
to the copying of a single line, particularly a literal copying.
(Note that even without this I don't dispute that
this was still infringement, but that it easily could have not been if
he'd implemented his own ceil(), even if he had still used a _Dint()
function.)

I have trouble parsing that one, but I think you're saying that some
variant of ceil that uses a _Dint-like function might not infringe.
And that's quite possible, since I can't and don't claim ownership
of the *idea* of a function like _Dint.
You said "some creativity, but not much", in comparing the #define's of
FP_* in his math.h vs your own differently-named constants internal to
_Dint. However, the token sequences "# define" and "( - 1 )" (etc)
clearly lack originality and are thus not copyrightable. The idea of
using -1 to represent normal, -2 to represent denormalised values, etc,
is an idea rather than an expression of an idea, and thus also not
copyrightable.

Uh, no. I've learned that you like to parse things down until you
can find some small arena -- usually somewhere off to the side --
where you can claim a partial victory of logic (and then map that
to total victory). But even by your standards this is pushing
things. Try convincing a welder and a stenographer on a jury that
that set of defines wasn't a close copy of the original. They
would know better.
What's left there? The names. Which he didn't use. I
think the basic disconnect here is that you do not understand the fact
that there do exist categories of works that are not eligible for
copyright protection.

I think I do, and I think you're straining at gnats and swallowing
camels in your zeal to be right.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
 
J

Juuso Hukkanen

I would like to help with this, I have ideas on implementing stdio, and

Perhaps MinGW's C library package could be used as material, after all
it is distributed as a public domain.

files available from www.mingw.org

Browseable files also through mirrors e.g.:
http://geog-www.sbs.ohio-state.edu/grads/jcoleman/MinGW/include/

btw, I use the opportunity to thank you all who have been patiently &
unselfisly posting codes to public domain. The CLC-wiki - project will
certainly be a very important resource for many - Keep up with good
work!

Juuso Hukkanen
(to reply by e-mail set addresses month and year to correct)
 
R

Richard G. Riley

Try convincing a welder and a stenographer on a jury that
that set of defines wasn't a close copy of the original. They
would know better.


Before I plaguarise this, did you make it up or is at "an old one"?
Excellent. Adapted to target issues of course
 
K

Keith Thompson

Juuso Hukkanen said:
Perhaps MinGW's C library package could be used as material, after all
it is distributed as a public domain.

files available from www.mingw.org
[...]

Since many people misuse the term "public domain", I checked on this.
According to <http://www.mingw.org/licensing.shtml>, the basic MinGW
runtime code is indeed "uncopyrighted and placed in the public
domain". (This is distinct from being copyrighted and released under
an open source license such as the GPL.)
 
J

Jordan Abel

I would like to apologize again for my attitude throughout this thread.
I've said some things that I didn't mean, and I'll admit that it's hard
for me to know when to drop something.
 
R

Richard G. Riley

I would like to apologize again for my attitude throughout this thread.
I've said some things that I didn't mean, and I'll admit that it's hard
for me to know when to drop something.

I've had a long day, and can't help but wonder if you're going to get
a reply which says

"what thread? Please read these posting guidelines ... context ..."

sorry. Just joking
 
M

Michael Mair

P.J. Plauger said:
We're just starting to build the competitive analysis part of
our web site to go with our new product launch. Soon you will
be able to see a few comparisons between our new library and
what comes with different compilers. And we'll provide a few
essays on the lesser known pitfalls of numerical computing.
Maybe then you'll see the point in licensing yet another
library when you already have one you've been using for years.

About when will that be?
At a quick glance, your "news" page is more of an "olds" page
and the tested implementations page could use an update, too
(I'd expect at least one more recent Microsoft library tested
for C++ conformance even though V6 still is in wide use). No
offense meant, I know how fast time can creep along...


Cheers
Michael
 
J

Jordan Abel

I've had a long day, and can't help but wonder if you're going to get
a reply which says

"what thread? Please read these posting guidelines ... context ..."

sorry. Just joking

Yeah... there was a reason for

But no-one ever looks at headers.
 
J

Jordan Abel

Context should go in the message, not in the headers.

It wasn't context. It was a statement that there was no relevant context
in the message that was being replied to, so the entire quoted text was
snipped :p
 
P

P.J. Plauger

About when will that be?

I was hoping for about another week or so, but the Berlin
C and C++ meetings are looming, so we probably won't put up
the new site until after then.
At a quick glance, your "news" page is more of an "olds" page
Indeed.

and the tested implementations page could use an update, too

Interestingly enough, when we put up the new competitive analysis
pages, you'll find that the other libraries have hardly changed
their degree of conformance in the past three years.
(I'd expect at least one more recent Microsoft library tested
for C++ conformance even though V6 still is in wide use). No
offense meant, I know how fast time can creep along...

No offense taken. We've been working so hard and so long on
all sorts of new things that we failed to notice how much time
has gone by, at least until recently. It's amazingly easy to
let your web site stagnate just one more month...

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
 
N

niiru

P.J. Plauger said:
(It's a lot more fun to write new code and spread it
around the world with your name on it than it is to write tests
and run them.)

For someone who has written many mails in this thread ventilating about
the effort he has put into his work being disrespected, this is an
incredibly cheap shot
at those who freely give away the fruits of their own endeavours. You
should
hold yourself to a higher standard.

On the subject of holding yourself to higher standards, the evolution
of

http://www.dinkumware.com/conform_c.html

is an interesting exercise in removal of issues in your testing /
test harness that have been pointed out to you over time. I see no
acknowledgement of quiet removal of previous inaccuracies, nor
acknowledgement of the disputed nature of several of the claims that
remain.

Having said that, I find the apparent blatant violation of your
copyright
reprehensible, but your defence thereof went steadily downhill after
your first post.
 
P

P.J. Plauger

For someone who has written many mails in this thread ventilating about
the effort he has put into his work being disrespected,

Not quite. It was my *ownership* that I found disrespected.
Nobody has to admire the effort I put into it, except me.
this is an
incredibly cheap shot
at those who freely give away the fruits of their own endeavours. You
should
hold yourself to a higher standard.

Excuse me, but I thought I was stating the obvious, and I certainly
meant no disrespect to the people who do give away their work. It
is simply true that it's more fun to write new code than to write
tests -- it is for me. One of the regrettable weaknesses of the
open source movement is that it never seems to produce enough tests.
And it is simply true that the major reward most contributors get
is having their name on useful software that is widely dispersed.
If you see disrespect in those observations, I'm sorry.
On the subject of holding yourself to higher standards, the evolution
of

http://www.dinkumware.com/conform_c.html

is an interesting exercise in removal of issues in your testing /
test harness that have been pointed out to you over time. I see no
acknowledgement of quiet removal of previous inaccuracies, nor
acknowledgement of the disputed nature of several of the claims that
remain.

I'm struggling a bit on this one. The only thing I can recall along
these lines was a challenge from Walter Bright (IIRC) that we
hadn't put up tests of his latest version. We didn't have time to
retest then, and I didn't think his product was worth all that
much attention, so I acceded to his wishes and simply dropped
that particular comparison. There was never any challenge to the
accuracy of what we said about the version we tested.

I've heard a few grumbles about the low scores some products
get from us, but nodoby has come forth with any evidence that
they're inaccurate or biased. Sure, we test with our own
proprietary test suite, but there are others. (We tested the
same products with Perennial's suite, to verify that our numbers
are sane, but we're not at liberty to disclose those test
results in detail.) Sadly, the open source tests don't check for
conformance, just regression against earlier behavior. And they're
*very* much tied to the nonstandard behavior of what they test.
Having said that, I find the apparent blatant violation of your
copyright
reprehensible, but your defence thereof went steadily downhill after
your first post.

Again, I'm sorry you have a lower opinion of my integrity,
but I suggest you try to tease apart your disappointment in
what I said from your belief that I was out of bounds in
saying it.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
 
R

Rod Pemberton

Keith Thompson said:
Juuso Hukkanen said:
Perhaps MinGW's C library package could be used as material, after all
it is distributed as a public domain.

files available from www.mingw.org
[...]

Since many people misuse the term "public domain", I checked on this.
According to <http://www.mingw.org/licensing.shtml>, the basic MinGW
runtime code is indeed "uncopyrighted and placed in the public
domain". (This is distinct from being copyrighted and released under
an open source license such as the GPL.)

Unfortunately, I've looked at every file in the MinGW library. There are
few copyrighted code pieces in their source. But, that number is small and
all the rest seems to be PD. (This is because they mix files from the
"basic MinGW" and the "Win32 API" and the C runtime into the same
directories.)


Rod Pemberton
 
O

Old Wolf

Ben said:
_The Standard C Library_ has in ceil.c:

#include "xmath.h"

double (ceil)(double x)
{ /* compute ceil(x) */
return (_Dint(&x, 0) < 0 && 0.0 < x ? x + 1.0 : x);
}

On clc-wiki.net:

#include "xmath.h"

double
(ceil) (double x)
{
return _Dint (&x, 0) < 0 && 0.0 < x ? x + 1.0 : x;
}

An obvious case of Plaugerism.
(sorry)
 
R

Ronald Bruck

[Intermediate posts elided]


:) I guess you have to read this in light of my later comments.
Perhaps what I should have said is, "which isn't obvious compared to
what's in a BLAS and LAPACK implementation."

AFAIK, there is no C version of LAPACK. They just run the Fortran
through f2c. One is almost always well-advised to use the chip
manufacturer's BLAS (and LAPACK, when available). There is a program
(ATLAS) which tunes the BLAS, but the results aren't usually as good as
the chip manufacturer's optimized code. However, concerning your
further point [below], I don't know how thoroughly tested these
libraries are.

My own personal peeve: my own work uses very high-precision arithmetic
(up to 16384 bits of precision), the purpose being to recognize
specific algebraic numbers. There's little point in trying to optimize
a BLAS for this, at least until cache sizes grow enormously. And
LAPACK turns out to have many, many constants hard-wired in, based on
IEEE arithmetic. Every time I need one of the routines from LAPACK I
have to trace it all back and rewrite, often modifying the logic, which
is so specific to IEEE754. That gets old fast. (But at least I'm
unlikely to be accused of copyright violations.) And of course math.h
is useless.

Which ISN'T paranoid, given the way Usenet works.
Us greedy capitalists read the literature too, y'know.

That's why it's there! And as I'm sure YOU know, many academics are
also involved in commercial enterprises. The A of RSA is right here at
the University of Southern California.
Evidently. You cited the most obvious -- bugs. We've developed what
I believe to be the best math testing harness in the business (and
in academia as well, from what I've seen so far). We've used it to
test all sorts of math libraries out there, and we've found all
sorts of problems. Don't get me wrong, the basic double math library
required by C89 is generally pretty good when you get it from the
likes of Microsoft, IBM, or Sun.

Agreed, testing is a truely woeful situation. Not just in the Open
Source and academic community--these are AFAIK always acknowledged to
be at the user's risk. What I don't like is being used as a guinea pig
by the major COMMERCIAL players--most notoriously, Microsoft.
Then there's the matter of completeness. We provide a complete
set of C99 math functions in all four IEEE precisions -- 24-bit,
53-bit, 64-bit, and 113-bit.

First I've heard of 113-bit precision. I'll check it out.
What we offer, by contrast, is the assurance that you can use
our library on a variety of popular platforms, all the functions
you need are there, and they work right everywhere.

I run SuSE Linux 9.3 on an AMD64 platform (FX55). (This is the fastest
system I've found at the multiprecision stuff.) I don't see this on
your list, and a $600 license for source is a bit high for my budget.
Of course the 32-bit version would work, but how much performance would
I lose?

--Ron Bruck
 
N

niiru

P.J. Plauger said:
I'm struggling a bit on this one. The only thing I can recall along
these lines was a challenge from Walter Bright (IIRC) that we
hadn't put up tests of his latest version. We didn't have time to
retest then, and I didn't think his product was worth all that
much attention, so I acceded to his wishes and simply dropped
that particular comparison. There was never any challenge to the
accuracy of what we said about the version we tested.

Your memory seems to be slipping. Let's start with

http://sourceware.org/ml/libc-alpha/2004-07/msg00120.html

and followups. The followups contain examples of the suspect
nature of some of your tests which I should think earns them the
label "disputed".
I've heard a few grumbles about the low scores some products
get from us,

Perhaps because of bogus results of broken tests?
but nodoby has come forth with any evidence that they're
inaccurate or biased.

In fact it would seem that they have, and you yourself recognised it.

Let me add another: anyone with access to a copy
can verify for themselves that your claim of GCC 3.2 that

"(Setting the GCC command line switch to indicate that the
language is C99 does not set the macro __STDC_VERSION__
to the correct value for C99 -- it remains set to 199409L.)"

is without merit. As documented, that switch is -std=c99.

Customers might start wondering about the quality of these tests.
 
C

CBFalconer

niiru said:
.... snip ...

Customers might start wondering about the quality of these tests.

Please do not snip attributions for material you quote. Your
message would imply that PJP wrote the portion marked ">>>" above.
He did not, you did. This is either carelessness or sneakiness.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
More details at: <http://cfaj.freeshell.org/google/>
Also see <http://www.safalra.com/special/googlegroupsreply/>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,265
Latest member
TodLarocca

Latest Threads

Top