473,900 Members | 3,343 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Implementation of functions in math.h on clc-wiki

I'm writing a portable implementation of the C standard library for
http://www.clc-wiki.net and I was wondering if someone could check the
functions in math.h for sanity/portability/whatever. I'm almost halfway
through writing the over 200 functions needed to implement C99's
version of math.h, and I would like to have some feedback and/or expert
advice on my implementations .

Sincerely, Gregory Pietsch

Mar 11 '06
110 8666
"Jordan Abel" <ra*******@gmai l.com> wrote in message
news:sl******** **************@ random.yi.org.. .
On 2006-03-13, P.J. Plauger <pj*@dinkumware .com> wrote:
"Rod Pemberton" <do*********@so rry.bitbuck.cmm > wrote in message
news:dv******** ***@news3.infoa ve.net...
> Essentially, you have a software patent through copyright.

Bullshit.

Wether you believe me or not, I believe you have a software patent
through
the use of a copyright. Copyright-misuse of this sort has resulted in
fortfeiture of copyright. I suspect you've never heard of
copyright-misuse:
http://en.wikipedia.org/wiki/Copyright_misuse
Stop hyperventilatin g.


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
Mar 13 '06 #81
On 2006-03-13, P.J. Plauger <pj*@dinkumware .com> wrote:
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
Mar 13 '06 #82
On 12 Mar 2006 05:44:28 GMT, Jordan Abel <ra*******@gmai l.com> wrote:
On 2006-03-11, Gregory Pietsch <GK**@flash.net > wrote:
I'm writing a portable implementation of the C standard library for
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/g...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)
Mar 13 '06 #83
Juuso Hukkanen <ju***********@ tele3d.net> writes:
On 12 Mar 2006 05:44:28 GMT, Jordan Abel <ra*******@gmai l.com> wrote:
On 2006-03-11, Gregory Pietsch <GK**@flash.net > wrote:
I'm writing a portable implementation of the C standard library for

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

[...]

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 "uncopyrigh ted and placed in the public
domain". (This is distinct from being copyrighted and released under
an open source license such as the GPL.)

--
Keith Thompson (The_Other_Keit h) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Mar 14 '06 #84
"Richard G. Riley" <rg****@gmail.c om> wrote in message
news:tc******** ****@quark.hadr on...
On 2006-03-13, P.J. Plauger <pj*@dinkumware .com> wrote:
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


Just made it up. But feel free to recycle it, unattributed.
Footnotes give me hives.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
Mar 14 '06 #85
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.
Mar 14 '06 #86
On 2006-03-14, Jordan Abel <ra*******@gmai l.com> wrote:
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
Mar 14 '06 #87
P.J. Plauger schrieb:
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
--
E-Mail: Mine is an /at/ gmx /dot/ de address.
Mar 14 '06 #88
On 2006-03-14, Richard G. Riley <rg****@gmail.c om> wrote:
On 2006-03-14, Jordan Abel <ra*******@gmai l.com> wrote:
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


Yeah... there was a reason for
X-No-Context: This message is about the thread in general, not the message which appears last in the References header.


But no-one ever looks at headers.
Mar 14 '06 #89
Jordan Abel <ra*******@gmai l.com> writes:
Yeah... there was a reason for
X-No-Context: This message is about the thread in general, not
the message which appears last in the References header.


Context should go in the message, not in the headers.
--
int main(void){char p[]="ABCDEFGHIJKLM NOPQRSTUVWXYZab cdefghijklmnopq rstuvwxyz.\
\n",*q="kl BIcNBFr.NKEzjwC IxNJC";int i=sizeof p/2;char *strchr();int putchar(\
);while(*q){i+= strchr(p,*q++)-p;if(i>=(int)si zeof p)i-=sizeof p-1;putchar(p[i]\
);}return 0;}
Mar 14 '06 #90

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2088
by: Robert Mark Bram | last post by:
Howdy All! I am trying to write a very brief comparison of the Date and Math objects in terms of instance v static objects. What I have below is my best so far. Any criticisms or suggestions are most welcome! Date is an instance object. You use Date by creating instances of it - you call methods on those instances. - you change data to do with each instance.
9
4670
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
17
3639
by: cwdjrxyz | last post by:
Javascript has a very small math function list. However there is no reason that this list can not be extended greatly. Speed is not an issue, unless you nest complicated calculations several levels deep. In that case you need much more ram than a PC has to store functions calculated in loops so that you do not have to recalculate every time you cycle through the nest of loops. Using a HD for storage to extend ram is much too slow for many...
6
2147
by: sathyashrayan | last post by:
Following are the selected thread from the date:30-jan-2005 to 31-jan-2005. I did not use any name because of the subject is important. You can get the original thread by typing the subject "string" in google comp.lang.c archives.Hope this helps.Hope I am not bothering any one. am I? =================================Start=========================== subject: Return to Start of Line? Question: I'd like printf, the next printf, to return...
6
4485
by: Thomas Lumley | last post by:
What does the standard guarantee about the accuracy of eg the trigonometric functions? There is obviously an implementation-dependent upper bound on the accuracy, since the answer is stored in a double, but is this bound actually achieved? First, a simple example Suppose I want the arc cosine of -1, and use acos(-1.0) to compute it. The correct answer to 25 hexadecimal digits is -3.243F6A8885A308D313198A2E. This falls between two ...
8
2926
by: Sensei | last post by:
I have a quick question about the math library included in the standard C90 (and 99). The gcc, xlc and possibly other compilers/linkers on some unix platforms cannot use any math functions in math.h if a switch (-lm) is used, so *explicitly* having the linker use a file called libm.so or libm.a/dylib/whatever. Is it true on all the platforms? (answer: probably no)
5
2261
by: Ark | last post by:
Hi everyone, Does anyone know if Direct3D overloads System.Math functions? Also is it possible to access the base functions of the overloaded function (in other words restore original of the overlaoded function)? Thank you
1
2066
by: silellak | last post by:
I have found an odd error when using an XSL stylesheet transform. We have a Notes/Domino application with the following line of code in one of the stylesheets: <xsl:value-of select="format-number(number(ActEmpMoneyValue),'###,###0.00')" /> After transforming an XML document object with this stylesheet, the value in the XML node ActEmpMoneyValue is not calculated, but a flat value such as "19.31". After being processed as above on...
35
2365
by: Francine.Neary | last post by:
I'm finding it really hard to keep some of these things straight... For example, fputs is to puts as fprintf is to printf, except that fputs has the file handle at the end and fprintf at the beginning! Very illogical! And hard to remember. Now this can quite easily be corrected by macros, for example: #include <stdio.h> #define fputs(X,Y) fputs(Y,X)
17
2487
by: Jason Doucette | last post by:
I am converting a C-style unit into a C++ class. I have an implementation function that was defined in the .cpp file (so it was hidden from the interface that exists in the .h file). It uses a structure that is only needed by the implementation, so it were declared in the .cpp file, as well. Now, when converting this into a class, the class definition exists in the .h file, since it's required by the interface. The implementation...
0
11276
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10976
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10497
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9671
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
8043
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7204
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5891
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6082
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4301
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.