summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Ryde <user42@zip.com.au>2001-11-30 01:48:24 +0100
committerKevin Ryde <user42@zip.com.au>2001-11-30 01:48:24 +0100
commit3946ba2727eea48822f3bf9e58202a2fe3d888c7 (patch)
tree58c5d789abbce464c3f3ca9013feae3be288ec06
parent5dfc8b7e23b1df5a9d23adbc469bd221eef82ca4 (diff)
downloadgmp-3946ba2727eea48822f3bf9e58202a2fe3d888c7.tar.gz
* mpfr: Update to 2001-11-16. Patch TMP handling of agm.c and sqrt.c,
separate .c files for floor and ceil, disable an expression assert in add1.c.
-rw-r--r--mpfr/COPYING617
-rw-r--r--mpfr/Makefile.am26
-rw-r--r--mpfr/Makefile.in215
-rw-r--r--mpfr/mpfr.texi561
-rw-r--r--mpfr/sin_cos.c275
-rw-r--r--mpfr/tests/Makefile.am4
-rw-r--r--mpfr/tests/Makefile.in284
-rw-r--r--mpfr/tests/tsin_cos.c146
8 files changed, 1011 insertions, 1117 deletions
diff --git a/mpfr/COPYING b/mpfr/COPYING
index 92b8903ff..5b6e7c66c 100644
--- a/mpfr/COPYING
+++ b/mpfr/COPYING
@@ -1,25 +1,22 @@
- GNU LIBRARY GENERAL PUBLIC LICENSE
+ GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
- Copyright (C) 1991 Free Software Foundation, Inc.
- 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
-[This is the first released version of the library GPL. It is
- numbered 2 because it goes with version 2 of the ordinary GPL.]
-
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
- This license, the Library General Public License, applies to some
-specially designated Free Software Foundation software, and to any
-other libraries whose authors decide to use it. You can use it for
-your libraries, too.
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
@@ -30,347 +27,195 @@ in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if
-you distribute copies of the library, or if you modify it.
-
- For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you. You must make sure that they, too, receive or can get the source
-code. If you link a program with the library, you must provide
-complete object files to the recipients so that they can relink them
-with the library, after making changes to the library and recompiling
-it. And you must show them these terms so they know their rights.
-
- Our method of protecting your rights has two steps: (1) copyright
-the library, and (2) offer you this license which gives you legal
-permission to copy, distribute and/or modify the library.
-
- Also, for each distributor's protection, we want to make certain
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
-library. If the library is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original
-version, so that any problems introduced by others will not reflect on
-the original authors' reputations.
-
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that companies distributing free
-software will individually obtain patent licenses, thus in effect
-transforming the program into proprietary software. To prevent this,
-we have made it clear that any patent must be licensed for everyone's
-free use or not licensed at all.
-
- Most GNU software, including some libraries, is covered by the ordinary
-GNU General Public License, which was designed for utility programs. This
-license, the GNU Library General Public License, applies to certain
-designated libraries. This license is quite different from the ordinary
-one; be sure to read it in full, and don't assume that anything in it is
-the same as in the ordinary license.
-
- The reason we have a separate public license for some libraries is that
-they blur the distinction we usually make between modifying or adding to a
-program and simply using it. Linking a program with a library, without
-changing the library, is in some sense simply using the library, and is
-analogous to running a utility program or application program. However, in
-a textual and legal sense, the linked executable is a combined work, a
-derivative of the original library, and the ordinary General Public License
-treats it as such.
-
- Because of this blurred distinction, using the ordinary General
-Public License for libraries did not effectively promote software
-sharing, because most developers did not use the libraries. We
-concluded that weaker conditions might promote sharing better.
-
- However, unrestricted linking of non-free programs would deprive the
-users of those programs of all benefit from the free status of the
-libraries themselves. This Library General Public License is intended to
-permit developers of non-free programs to use free libraries, while
-preserving your freedom as a user of such programs to change the free
-libraries that are incorporated in them. (We have not seen how to achieve
-this as regards changes in header files, but we have achieved it as regards
-changes in the actual functions of the Library.) The hope is that this
-will lead to faster development of free libraries.
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
-modification follow. Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library". The
-former contains code derived from the library, while the latter only
-works together with the library.
-
- Note that it is possible for a library to be covered by the ordinary
-General Public License rather than by this special one.
+modification follow.
- GNU LIBRARY GENERAL PUBLIC LICENSE
+ GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- 0. This License Agreement applies to any software library which
-contains a notice placed by the copyright holder or other authorized
-party saying it may be distributed under the terms of this Library
-General Public License (also called "this License"). Each licensee is
-addressed as "you".
-
- A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
- The "Library", below, refers to any such software library or work
-which has been distributed under these terms. A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language. (Hereinafter, translation is
-included without limitation in the term "modification".)
-
- "Source code" for a work means the preferred form of the work for
-making modifications to it. For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control compilation
-and installation of the library.
-
- Activities other than copying, distribution and modification are not
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it). Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
- 1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
- You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
- 2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
- a) The modified work must itself be a software library.
-
- b) You must cause the files modified to carry prominent notices
+ a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
- c) You must cause the whole of the work to be licensed at no
- charge to all third parties under the terms of this License.
-
- d) If a facility in the modified Library refers to a function or a
- table of data to be supplied by an application program that uses
- the facility, other than as an argument passed when the facility
- is invoked, then you must make a good faith effort to ensure that,
- in the event an application does not supply such function or
- table, the facility still operates, and performs whatever part of
- its purpose remains meaningful.
-
- (For example, a function in a library to compute square roots has
- a purpose that is entirely well-defined independent of the
- application. Therefore, Subsection 2d requires that any
- application-supplied function or table used by this function must
- be optional: if the application does not supply it, the square
- root function must still compute square roots.)
-
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Library,
+identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
+on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
+entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
-collective works based on the Library.
+collective works based on the Program.
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
- 3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library. To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License. (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.) Do not make any other change in
-these notices.
-
- Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
- This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
- 4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
- If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
-
- 5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library". Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
- However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library". The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
- When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library. The
-threshold for this to be true is not precisely defined by law.
-
- If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work. (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
- Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-
- 6. As an exception to the Sections above, you may also compile or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
- You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License. You must supply a copy of this License. If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License. Also, you must do one
-of these things:
-
- a) Accompany the work with the complete corresponding
- machine-readable source code for the Library including whatever
- changes were used in the work (which must be distributed under
- Sections 1 and 2 above); and, if the work is an executable linked
- with the Library, with the complete machine-readable "work that
- uses the Library", as object code and/or source code, so that the
- user can modify the Library and then relink to produce a modified
- executable containing the modified Library. (It is understood
- that the user who changes the contents of definitions files in the
- Library will not necessarily be able to recompile the application
- to use the modified definitions.)
-
- b) Accompany the work with a written offer, valid for at
- least three years, to give the same user the materials
- specified in Subsection 6a, above, for a charge no more
- than the cost of performing this distribution.
-
- c) If distribution of the work is made by offering access to copy
- from a designated place, offer equivalent access to copy the above
- specified materials from the same place.
-
- d) Verify that the user has already received a copy of these
- materials or that you have already sent this user a copy.
-
- For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it. However, as a special exception,
-the source code distributed need not include anything that is normally
-distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
- It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system. Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
- 7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
- a) Accompany the combined library with a copy of the same work
- based on the Library, uncombined with any other library
- facilities. This must be distributed under the terms of the
- Sections above.
-
- b) Give prominent notice with the combined library of the fact
- that part of it is a work based on the Library, and explaining
- where to find the accompanying uncombined form of the same work.
-
- 8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License. Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License. However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
- 9. You are not required to accept this License, since you have not
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
-distribute the Library or its derivative works. These actions are
+distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
+the Program or works based on it.
- 10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions. You may not impose any further
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
-
- 11. If, as a consequence of a court judgment or allegation of patent
+
+ 7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all. For example, if a patent
-license would not permit royalty-free redistribution of the Library by
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
+refrain entirely from distribution of the Program.
-If any portion of this section is held invalid or unenforceable under any
-particular circumstance, the balance of the section is intended to apply,
-and the section as a whole is intended to apply in other circumstances.
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
+integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
@@ -380,102 +225,116 @@ impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
-
- 12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License may add
-an explicit geographical distribution limitation excluding those countries,
-so that distribution is permitted only in or among countries not thus
-excluded. In such case, this License incorporates the limitation as if
-written in the body of this License.
-
- 13. The Free Software Foundation may publish revised and/or new
-versions of the Library General Public License from time to time.
-Such new versions will be similar in spirit to the present version,
-but may differ in detail to address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation. If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
- 14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission. For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this. Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
NO WARRANTY
- 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
-KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
-LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
-FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
-CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
-LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
-RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
-FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
- How to Apply These Terms to Your New Libraries
+ How to Apply These Terms to Your New Programs
- If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change. You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms of the
-ordinary General Public License).
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
- To apply these terms, attach the following notices to the library. It is
-safest to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least the
-"copyright" line and a pointer to where the full notice is found.
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
- <one line to give the library's name and a brief idea of what it does.>
+ <one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
- This library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU Library General Public
- License along with this library; if not, write to the Free
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
Also add information on how to contact you by electronic and paper mail.
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the library, if
+school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
- Yoyodyne, Inc., hereby disclaims all copyright interest in the
- library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
- <signature of Ty Coon>, 1 April 1990
+ <signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
-That's all there is to it!
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/mpfr/Makefile.am b/mpfr/Makefile.am
index d2993c7c2..995bd95e4 100644
--- a/mpfr/Makefile.am
+++ b/mpfr/Makefile.am
@@ -27,38 +27,22 @@
AUTOMAKE_OPTIONS = gnu no-dependencies $(top_builddir)/ansi2knr
SUBDIRS = tests
-INCLUDES = -I$(top_srcdir) -DOPERATION_`echo $* | sed 's/_$$//'`
+INCLUDES = -I$(top_srcdir)
if WANT_MPFR
lib_LIBRARIES = libmpfr.a
include_HEADERS = mpfr.h
endif
-# FIXME: As of automake 1.4f info_TEXINFOS can't be conditionalized, see top
-# level Makefile.am for the workaround.
+# FIXME: Automake (version 1.5) doesn't allow conditionalized info_TEXINFOS,
+# see top level Makefile.am for the workaround.
info_TEXINFOS = mpfr.texi
TEXINFO_TEX = ../texinfo.tex
# Override automake default AR=ar with the value from GMP_PROG_AR.
AR = @AR@
-libmpfr_a_SOURCES = cputime.h mpfr.h mpfr-impl.h sin_cos.c extract.c \
- add.c add_ui.c add_ulp.c agm.c clear.c cmp.c cmp_ui.c div_2exp.c \
- div.c div_ui.c dump.c eq.c exp2.c exp3.c exp.c get_str.c init.c \
- inp_str.c isnan.c log2.c log.c mul_2exp.c mul.c mul_ui.c neg.c out_str.c \
- pi.c pow.c print_raw.c print_rnd_mode.c random2.c random.c reldiff.c \
- rnd_mode.c round.c set.c set_d.c set_dfl_prec.c set_rnd.c set_f.c \
- set_prc_raw.c set_prec.c set_q.c set_si.c set_ui.c set_str.c set_str_raw.c \
- set_z.c sqrt.c sqrt_ui.c sub.c sub_ui.c trunc.c ui_div.c ui_sub.c \
- urandomb.c mpz_set_fr.c swap.c
-
-nodist_libmpfr_a_SOURCES = floor.c ceil.c
+libmpfr_a_SOURCES= cputime.h mpfr.h mpfr-impl.h exceptions.c save_expo.c extract.c add.c add1.c add_ui.c add_ulp.c agm.c clear.c cmp.c cmp_abs.c cmp_ui.c div_2exp.c div.c div_ui.c dump.c eq.c exp2.c exp3.c exp.c get_str.c init.c inp_str.c isinteger.c isinf.c isnan.c isnum.c log2.c log.c mul_2exp.c mul.c mul_ui.c neg.c out_str.c pi.c pow.c pow_si.c pow_ui.c print_raw.c print_rnd_mode.c random2.c random.c reldiff.c rnd_mode.c round.c set.c set_d.c set_dfl_prec.c set_rnd.c set_f.c set_prc_raw.c set_prec.c set_q.c set_si.c set_str.c set_str_raw.c set_ui.c set_z.c sqrt.c sqrt_ui.c sub.c sub1.c sub_ui.c trunc.c ui_div.c ui_sub.c urandomb.c mpz_set_fr.c swap.c factorial.c cosh.c sinh.c tanh.c acosh.c asinh.c atanh.c atan.c cmp2.c exp_2.c asin.c euler.c cos.c sin.c tan.c fma.c hypot.c log1p.c expm1.c log_base_2.c ui_pow.c ui_pow_ui.c log_base_10.c minmax.c dim.c copysign.c gmp_op.c init2.c \
+ floor.c ceil.c
EXTRA_DIST = generic.c mpfr-test.h mpf2mpfr.h
-
-CLEANFILES = $(nodist_libmpfr_a_SOURCES)
-
-floor.c: $(srcdir)/trunc.c
- cp $(srcdir)/trunc.c floor.c
-ceil.c: $(srcdir)/trunc.c
- cp $(srcdir)/trunc.c ceil.c
diff --git a/mpfr/Makefile.in b/mpfr/Makefile.in
index 02c99b32a..7007d4c05 100644
--- a/mpfr/Makefile.in
+++ b/mpfr/Makefile.in
@@ -135,32 +135,21 @@ AR = @AR@
AUTOMAKE_OPTIONS = gnu no-dependencies $(top_builddir)/ansi2knr
SUBDIRS = tests
-INCLUDES = -I$(top_srcdir) -DOPERATION_`echo $* | sed 's/_$$//'`
+INCLUDES = -I$(top_srcdir)
@WANT_MPFR_TRUE@lib_LIBRARIES = libmpfr.a
@WANT_MPFR_TRUE@include_HEADERS = mpfr.h
-# FIXME: As of automake 1.4f info_TEXINFOS can't be conditionalized, see top
-# level Makefile.am for the workaround.
+# FIXME: Automake (version 1.5) doesn't allow conditionalized info_TEXINFOS,
+# see top level Makefile.am for the workaround.
info_TEXINFOS = mpfr.texi
TEXINFO_TEX = ../texinfo.tex
-libmpfr_a_SOURCES = cputime.h mpfr.h mpfr-impl.h sin_cos.c extract.c \
- add.c add_ui.c add_ulp.c agm.c clear.c cmp.c cmp_ui.c div_2exp.c \
- div.c div_ui.c dump.c eq.c exp2.c exp3.c exp.c get_str.c init.c \
- inp_str.c isnan.c log2.c log.c mul_2exp.c mul.c mul_ui.c neg.c out_str.c \
- pi.c pow.c print_raw.c print_rnd_mode.c random2.c random.c reldiff.c \
- rnd_mode.c round.c set.c set_d.c set_dfl_prec.c set_rnd.c set_f.c \
- set_prc_raw.c set_prec.c set_q.c set_si.c set_ui.c set_str.c set_str_raw.c \
- set_z.c sqrt.c sqrt_ui.c sub.c sub_ui.c trunc.c ui_div.c ui_sub.c \
- urandomb.c mpz_set_fr.c swap.c
+libmpfr_a_SOURCES = cputime.h mpfr.h mpfr-impl.h exceptions.c save_expo.c extract.c add.c add1.c add_ui.c add_ulp.c agm.c clear.c cmp.c cmp_abs.c cmp_ui.c div_2exp.c div.c div_ui.c dump.c eq.c exp2.c exp3.c exp.c get_str.c init.c inp_str.c isinteger.c isinf.c isnan.c isnum.c log2.c log.c mul_2exp.c mul.c mul_ui.c neg.c out_str.c pi.c pow.c pow_si.c pow_ui.c print_raw.c print_rnd_mode.c random2.c random.c reldiff.c rnd_mode.c round.c set.c set_d.c set_dfl_prec.c set_rnd.c set_f.c set_prc_raw.c set_prec.c set_q.c set_si.c set_str.c set_str_raw.c set_ui.c set_z.c sqrt.c sqrt_ui.c sub.c sub1.c sub_ui.c trunc.c ui_div.c ui_sub.c urandomb.c mpz_set_fr.c swap.c factorial.c cosh.c sinh.c tanh.c acosh.c asinh.c atanh.c atan.c cmp2.c exp_2.c asin.c euler.c cos.c sin.c tan.c fma.c hypot.c log1p.c expm1.c log_base_2.c ui_pow.c ui_pow_ui.c log_base_10.c minmax.c dim.c copysign.c gmp_op.c init2.c \
+ floor.c ceil.c
-nodist_libmpfr_a_SOURCES = floor.c ceil.c
-
EXTRA_DIST = generic.c mpfr-test.h mpf2mpfr.h
-
-CLEANFILES = $(nodist_libmpfr_a_SOURCES)
subdir = mpfr
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
@@ -169,29 +158,41 @@ LIBRARIES = $(lib_LIBRARIES)
libmpfr_a_AR = $(AR) cru
libmpfr_a_LIBADD =
-am_libmpfr_a_OBJECTS = sin_cos$U.$(OBJEXT) extract$U.$(OBJEXT) \
- add$U.$(OBJEXT) add_ui$U.$(OBJEXT) add_ulp$U.$(OBJEXT) \
- agm$U.$(OBJEXT) clear$U.$(OBJEXT) cmp$U.$(OBJEXT) \
+am_libmpfr_a_OBJECTS = exceptions$U.$(OBJEXT) save_expo$U.$(OBJEXT) \
+ extract$U.$(OBJEXT) add$U.$(OBJEXT) add1$U.$(OBJEXT) \
+ add_ui$U.$(OBJEXT) add_ulp$U.$(OBJEXT) agm$U.$(OBJEXT) \
+ clear$U.$(OBJEXT) cmp$U.$(OBJEXT) cmp_abs$U.$(OBJEXT) \
cmp_ui$U.$(OBJEXT) div_2exp$U.$(OBJEXT) div$U.$(OBJEXT) \
div_ui$U.$(OBJEXT) dump$U.$(OBJEXT) eq$U.$(OBJEXT) \
exp2$U.$(OBJEXT) exp3$U.$(OBJEXT) exp$U.$(OBJEXT) \
get_str$U.$(OBJEXT) init$U.$(OBJEXT) inp_str$U.$(OBJEXT) \
- isnan$U.$(OBJEXT) log2$U.$(OBJEXT) log$U.$(OBJEXT) \
+ isinteger$U.$(OBJEXT) isinf$U.$(OBJEXT) isnan$U.$(OBJEXT) \
+ isnum$U.$(OBJEXT) log2$U.$(OBJEXT) log$U.$(OBJEXT) \
mul_2exp$U.$(OBJEXT) mul$U.$(OBJEXT) mul_ui$U.$(OBJEXT) \
neg$U.$(OBJEXT) out_str$U.$(OBJEXT) pi$U.$(OBJEXT) \
- pow$U.$(OBJEXT) print_raw$U.$(OBJEXT) \
- print_rnd_mode$U.$(OBJEXT) random2$U.$(OBJEXT) \
- random$U.$(OBJEXT) reldiff$U.$(OBJEXT) rnd_mode$U.$(OBJEXT) \
- round$U.$(OBJEXT) set$U.$(OBJEXT) set_d$U.$(OBJEXT) \
- set_dfl_prec$U.$(OBJEXT) set_rnd$U.$(OBJEXT) set_f$U.$(OBJEXT) \
- set_prc_raw$U.$(OBJEXT) set_prec$U.$(OBJEXT) set_q$U.$(OBJEXT) \
- set_si$U.$(OBJEXT) set_ui$U.$(OBJEXT) set_str$U.$(OBJEXT) \
- set_str_raw$U.$(OBJEXT) set_z$U.$(OBJEXT) sqrt$U.$(OBJEXT) \
- sqrt_ui$U.$(OBJEXT) sub$U.$(OBJEXT) sub_ui$U.$(OBJEXT) \
- trunc$U.$(OBJEXT) ui_div$U.$(OBJEXT) ui_sub$U.$(OBJEXT) \
- urandomb$U.$(OBJEXT) mpz_set_fr$U.$(OBJEXT) swap$U.$(OBJEXT)
-nodist_libmpfr_a_OBJECTS = floor$U.$(OBJEXT) ceil$U.$(OBJEXT)
-libmpfr_a_OBJECTS = $(am_libmpfr_a_OBJECTS) $(nodist_libmpfr_a_OBJECTS)
+ pow$U.$(OBJEXT) pow_si$U.$(OBJEXT) pow_ui$U.$(OBJEXT) \
+ print_raw$U.$(OBJEXT) print_rnd_mode$U.$(OBJEXT) \
+ random2$U.$(OBJEXT) random$U.$(OBJEXT) reldiff$U.$(OBJEXT) \
+ rnd_mode$U.$(OBJEXT) round$U.$(OBJEXT) set$U.$(OBJEXT) \
+ set_d$U.$(OBJEXT) set_dfl_prec$U.$(OBJEXT) set_rnd$U.$(OBJEXT) \
+ set_f$U.$(OBJEXT) set_prc_raw$U.$(OBJEXT) set_prec$U.$(OBJEXT) \
+ set_q$U.$(OBJEXT) set_si$U.$(OBJEXT) set_str$U.$(OBJEXT) \
+ set_str_raw$U.$(OBJEXT) set_ui$U.$(OBJEXT) set_z$U.$(OBJEXT) \
+ sqrt$U.$(OBJEXT) sqrt_ui$U.$(OBJEXT) sub$U.$(OBJEXT) \
+ sub1$U.$(OBJEXT) sub_ui$U.$(OBJEXT) trunc$U.$(OBJEXT) \
+ ui_div$U.$(OBJEXT) ui_sub$U.$(OBJEXT) urandomb$U.$(OBJEXT) \
+ mpz_set_fr$U.$(OBJEXT) swap$U.$(OBJEXT) factorial$U.$(OBJEXT) \
+ cosh$U.$(OBJEXT) sinh$U.$(OBJEXT) tanh$U.$(OBJEXT) \
+ acosh$U.$(OBJEXT) asinh$U.$(OBJEXT) atanh$U.$(OBJEXT) \
+ atan$U.$(OBJEXT) cmp2$U.$(OBJEXT) exp_2$U.$(OBJEXT) \
+ asin$U.$(OBJEXT) euler$U.$(OBJEXT) cos$U.$(OBJEXT) \
+ sin$U.$(OBJEXT) tan$U.$(OBJEXT) fma$U.$(OBJEXT) \
+ hypot$U.$(OBJEXT) log1p$U.$(OBJEXT) expm1$U.$(OBJEXT) \
+ log_base_2$U.$(OBJEXT) ui_pow$U.$(OBJEXT) ui_pow_ui$U.$(OBJEXT) \
+ log_base_10$U.$(OBJEXT) minmax$U.$(OBJEXT) dim$U.$(OBJEXT) \
+ copysign$U.$(OBJEXT) gmp_op$U.$(OBJEXT) init2$U.$(OBJEXT) \
+ floor$U.$(OBJEXT) ceil$U.$(OBJEXT)
+libmpfr_a_OBJECTS = $(am_libmpfr_a_OBJECTS)
DEFS = @DEFS@
DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
@@ -218,10 +219,10 @@ RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \
uninstall-info-recursive all-recursive install-data-recursive \
install-exec-recursive installdirs-recursive install-recursive \
uninstall-recursive check-recursive installcheck-recursive
-DIST_COMMON = README $(include_HEADERS) AUTHORS COPYING Makefile.am \
- Makefile.in NEWS TODO
+DIST_COMMON = README $(include_HEADERS) AUTHORS COPYING COPYING.LIB \
+ ChangeLog Makefile.am Makefile.in NEWS TODO
DIST_SUBDIRS = $(SUBDIRS)
-SOURCES = $(libmpfr_a_SOURCES) $(nodist_libmpfr_a_SOURCES)
+SOURCES = $(libmpfr_a_SOURCES)
all: all-recursive
@@ -295,22 +296,46 @@ mostlyclean-kr:
.c.lo:
$(LTCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<
+acosh_.c: acosh.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/acosh.c; then echo $(srcdir)/acosh.c; else echo acosh.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > acosh_.c || rm -f acosh_.c
add_.c: add.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/add.c; then echo $(srcdir)/add.c; else echo add.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > add_.c || rm -f add_.c
+add1_.c: add1.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/add1.c; then echo $(srcdir)/add1.c; else echo add1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > add1_.c || rm -f add1_.c
add_ui_.c: add_ui.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/add_ui.c; then echo $(srcdir)/add_ui.c; else echo add_ui.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > add_ui_.c || rm -f add_ui_.c
add_ulp_.c: add_ulp.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/add_ulp.c; then echo $(srcdir)/add_ulp.c; else echo add_ulp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > add_ulp_.c || rm -f add_ulp_.c
agm_.c: agm.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/agm.c; then echo $(srcdir)/agm.c; else echo agm.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > agm_.c || rm -f agm_.c
+asin_.c: asin.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/asin.c; then echo $(srcdir)/asin.c; else echo asin.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > asin_.c || rm -f asin_.c
+asinh_.c: asinh.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/asinh.c; then echo $(srcdir)/asinh.c; else echo asinh.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > asinh_.c || rm -f asinh_.c
+atan_.c: atan.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/atan.c; then echo $(srcdir)/atan.c; else echo atan.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > atan_.c || rm -f atan_.c
+atanh_.c: atanh.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/atanh.c; then echo $(srcdir)/atanh.c; else echo atanh.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > atanh_.c || rm -f atanh_.c
ceil_.c: ceil.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ceil.c; then echo $(srcdir)/ceil.c; else echo ceil.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ceil_.c || rm -f ceil_.c
clear_.c: clear.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clear.c; then echo $(srcdir)/clear.c; else echo clear.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > clear_.c || rm -f clear_.c
cmp_.c: cmp.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cmp.c; then echo $(srcdir)/cmp.c; else echo cmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > cmp_.c || rm -f cmp_.c
+cmp2_.c: cmp2.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cmp2.c; then echo $(srcdir)/cmp2.c; else echo cmp2.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > cmp2_.c || rm -f cmp2_.c
+cmp_abs_.c: cmp_abs.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cmp_abs.c; then echo $(srcdir)/cmp_abs.c; else echo cmp_abs.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > cmp_abs_.c || rm -f cmp_abs_.c
cmp_ui_.c: cmp_ui.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cmp_ui.c; then echo $(srcdir)/cmp_ui.c; else echo cmp_ui.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > cmp_ui_.c || rm -f cmp_ui_.c
+copysign_.c: copysign.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/copysign.c; then echo $(srcdir)/copysign.c; else echo copysign.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > copysign_.c || rm -f copysign_.c
+cos_.c: cos.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cos.c; then echo $(srcdir)/cos.c; else echo cos.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > cos_.c || rm -f cos_.c
+cosh_.c: cosh.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cosh.c; then echo $(srcdir)/cosh.c; else echo cosh.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > cosh_.c || rm -f cosh_.c
+dim_.c: dim.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dim.c; then echo $(srcdir)/dim.c; else echo dim.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > dim_.c || rm -f dim_.c
div_.c: div.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/div.c; then echo $(srcdir)/div.c; else echo div.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > div_.c || rm -f div_.c
div_2exp_.c: div_2exp.c $(ANSI2KNR)
@@ -321,28 +346,60 @@ dump_.c: dump.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dump.c; then echo $(srcdir)/dump.c; else echo dump.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > dump_.c || rm -f dump_.c
eq_.c: eq.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/eq.c; then echo $(srcdir)/eq.c; else echo eq.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > eq_.c || rm -f eq_.c
+euler_.c: euler.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/euler.c; then echo $(srcdir)/euler.c; else echo euler.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > euler_.c || rm -f euler_.c
+exceptions_.c: exceptions.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/exceptions.c; then echo $(srcdir)/exceptions.c; else echo exceptions.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > exceptions_.c || rm -f exceptions_.c
exp_.c: exp.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/exp.c; then echo $(srcdir)/exp.c; else echo exp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > exp_.c || rm -f exp_.c
exp2_.c: exp2.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/exp2.c; then echo $(srcdir)/exp2.c; else echo exp2.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > exp2_.c || rm -f exp2_.c
exp3_.c: exp3.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/exp3.c; then echo $(srcdir)/exp3.c; else echo exp3.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > exp3_.c || rm -f exp3_.c
+exp_2_.c: exp_2.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/exp_2.c; then echo $(srcdir)/exp_2.c; else echo exp_2.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > exp_2_.c || rm -f exp_2_.c
+expm1_.c: expm1.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/expm1.c; then echo $(srcdir)/expm1.c; else echo expm1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > expm1_.c || rm -f expm1_.c
extract_.c: extract.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/extract.c; then echo $(srcdir)/extract.c; else echo extract.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > extract_.c || rm -f extract_.c
+factorial_.c: factorial.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/factorial.c; then echo $(srcdir)/factorial.c; else echo factorial.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > factorial_.c || rm -f factorial_.c
floor_.c: floor.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/floor.c; then echo $(srcdir)/floor.c; else echo floor.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > floor_.c || rm -f floor_.c
+fma_.c: fma.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/fma.c; then echo $(srcdir)/fma.c; else echo fma.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > fma_.c || rm -f fma_.c
get_str_.c: get_str.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/get_str.c; then echo $(srcdir)/get_str.c; else echo get_str.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > get_str_.c || rm -f get_str_.c
+gmp_op_.c: gmp_op.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/gmp_op.c; then echo $(srcdir)/gmp_op.c; else echo gmp_op.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gmp_op_.c || rm -f gmp_op_.c
+hypot_.c: hypot.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hypot.c; then echo $(srcdir)/hypot.c; else echo hypot.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > hypot_.c || rm -f hypot_.c
init_.c: init.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/init.c; then echo $(srcdir)/init.c; else echo init.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > init_.c || rm -f init_.c
+init2_.c: init2.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/init2.c; then echo $(srcdir)/init2.c; else echo init2.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > init2_.c || rm -f init2_.c
inp_str_.c: inp_str.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/inp_str.c; then echo $(srcdir)/inp_str.c; else echo inp_str.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > inp_str_.c || rm -f inp_str_.c
+isinf_.c: isinf.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/isinf.c; then echo $(srcdir)/isinf.c; else echo isinf.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > isinf_.c || rm -f isinf_.c
+isinteger_.c: isinteger.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/isinteger.c; then echo $(srcdir)/isinteger.c; else echo isinteger.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > isinteger_.c || rm -f isinteger_.c
isnan_.c: isnan.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/isnan.c; then echo $(srcdir)/isnan.c; else echo isnan.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > isnan_.c || rm -f isnan_.c
+isnum_.c: isnum.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/isnum.c; then echo $(srcdir)/isnum.c; else echo isnum.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > isnum_.c || rm -f isnum_.c
log_.c: log.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/log.c; then echo $(srcdir)/log.c; else echo log.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > log_.c || rm -f log_.c
+log1p_.c: log1p.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/log1p.c; then echo $(srcdir)/log1p.c; else echo log1p.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > log1p_.c || rm -f log1p_.c
log2_.c: log2.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/log2.c; then echo $(srcdir)/log2.c; else echo log2.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > log2_.c || rm -f log2_.c
+log_base_10_.c: log_base_10.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/log_base_10.c; then echo $(srcdir)/log_base_10.c; else echo log_base_10.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > log_base_10_.c || rm -f log_base_10_.c
+log_base_2_.c: log_base_2.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/log_base_2.c; then echo $(srcdir)/log_base_2.c; else echo log_base_2.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > log_base_2_.c || rm -f log_base_2_.c
+minmax_.c: minmax.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/minmax.c; then echo $(srcdir)/minmax.c; else echo minmax.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > minmax_.c || rm -f minmax_.c
mpz_set_fr_.c: mpz_set_fr.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mpz_set_fr.c; then echo $(srcdir)/mpz_set_fr.c; else echo mpz_set_fr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > mpz_set_fr_.c || rm -f mpz_set_fr_.c
mul_.c: mul.c $(ANSI2KNR)
@@ -359,6 +416,10 @@ pi_.c: pi.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/pi.c; then echo $(srcdir)/pi.c; else echo pi.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > pi_.c || rm -f pi_.c
pow_.c: pow.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/pow.c; then echo $(srcdir)/pow.c; else echo pow.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > pow_.c || rm -f pow_.c
+pow_si_.c: pow_si.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/pow_si.c; then echo $(srcdir)/pow_si.c; else echo pow_si.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > pow_si_.c || rm -f pow_si_.c
+pow_ui_.c: pow_ui.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/pow_ui.c; then echo $(srcdir)/pow_ui.c; else echo pow_ui.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > pow_ui_.c || rm -f pow_ui_.c
print_raw_.c: print_raw.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/print_raw.c; then echo $(srcdir)/print_raw.c; else echo print_raw.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > print_raw_.c || rm -f print_raw_.c
print_rnd_mode_.c: print_rnd_mode.c $(ANSI2KNR)
@@ -373,6 +434,8 @@ rnd_mode_.c: rnd_mode.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rnd_mode.c; then echo $(srcdir)/rnd_mode.c; else echo rnd_mode.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > rnd_mode_.c || rm -f rnd_mode_.c
round_.c: round.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/round.c; then echo $(srcdir)/round.c; else echo round.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > round_.c || rm -f round_.c
+save_expo_.c: save_expo.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/save_expo.c; then echo $(srcdir)/save_expo.c; else echo save_expo.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > save_expo_.c || rm -f save_expo_.c
set_.c: set.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/set.c; then echo $(srcdir)/set.c; else echo set.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > set_.c || rm -f set_.c
set_d_.c: set_d.c $(ANSI2KNR)
@@ -399,54 +462,82 @@ set_ui_.c: set_ui.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/set_ui.c; then echo $(srcdir)/set_ui.c; else echo set_ui.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > set_ui_.c || rm -f set_ui_.c
set_z_.c: set_z.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/set_z.c; then echo $(srcdir)/set_z.c; else echo set_z.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > set_z_.c || rm -f set_z_.c
-sin_cos_.c: sin_cos.c $(ANSI2KNR)
- $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sin_cos.c; then echo $(srcdir)/sin_cos.c; else echo sin_cos.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > sin_cos_.c || rm -f sin_cos_.c
+sin_.c: sin.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sin.c; then echo $(srcdir)/sin.c; else echo sin.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > sin_.c || rm -f sin_.c
+sinh_.c: sinh.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sinh.c; then echo $(srcdir)/sinh.c; else echo sinh.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > sinh_.c || rm -f sinh_.c
sqrt_.c: sqrt.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sqrt.c; then echo $(srcdir)/sqrt.c; else echo sqrt.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > sqrt_.c || rm -f sqrt_.c
sqrt_ui_.c: sqrt_ui.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sqrt_ui.c; then echo $(srcdir)/sqrt_ui.c; else echo sqrt_ui.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > sqrt_ui_.c || rm -f sqrt_ui_.c
sub_.c: sub.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sub.c; then echo $(srcdir)/sub.c; else echo sub.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > sub_.c || rm -f sub_.c
+sub1_.c: sub1.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sub1.c; then echo $(srcdir)/sub1.c; else echo sub1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > sub1_.c || rm -f sub1_.c
sub_ui_.c: sub_ui.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sub_ui.c; then echo $(srcdir)/sub_ui.c; else echo sub_ui.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > sub_ui_.c || rm -f sub_ui_.c
swap_.c: swap.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/swap.c; then echo $(srcdir)/swap.c; else echo swap.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > swap_.c || rm -f swap_.c
+tan_.c: tan.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tan.c; then echo $(srcdir)/tan.c; else echo tan.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > tan_.c || rm -f tan_.c
+tanh_.c: tanh.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tanh.c; then echo $(srcdir)/tanh.c; else echo tanh.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > tanh_.c || rm -f tanh_.c
trunc_.c: trunc.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/trunc.c; then echo $(srcdir)/trunc.c; else echo trunc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > trunc_.c || rm -f trunc_.c
ui_div_.c: ui_div.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ui_div.c; then echo $(srcdir)/ui_div.c; else echo ui_div.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ui_div_.c || rm -f ui_div_.c
+ui_pow_.c: ui_pow.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ui_pow.c; then echo $(srcdir)/ui_pow.c; else echo ui_pow.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ui_pow_.c || rm -f ui_pow_.c
+ui_pow_ui_.c: ui_pow_ui.c $(ANSI2KNR)
+ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ui_pow_ui.c; then echo $(srcdir)/ui_pow_ui.c; else echo ui_pow_ui.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ui_pow_ui_.c || rm -f ui_pow_ui_.c
ui_sub_.c: ui_sub.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ui_sub.c; then echo $(srcdir)/ui_sub.c; else echo ui_sub.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > ui_sub_.c || rm -f ui_sub_.c
urandomb_.c: urandomb.c $(ANSI2KNR)
$(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/urandomb.c; then echo $(srcdir)/urandomb.c; else echo urandomb.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > urandomb_.c || rm -f urandomb_.c
-add_.$(OBJEXT) add_.lo add_ui_.$(OBJEXT) add_ui_.lo add_ulp_.$(OBJEXT) \
-add_ulp_.lo agm_.$(OBJEXT) agm_.lo ceil_.$(OBJEXT) ceil_.lo \
-clear_.$(OBJEXT) clear_.lo cmp_.$(OBJEXT) cmp_.lo cmp_ui_.$(OBJEXT) \
-cmp_ui_.lo div_.$(OBJEXT) div_.lo div_2exp_.$(OBJEXT) div_2exp_.lo \
+acosh_.$(OBJEXT) acosh_.lo add_.$(OBJEXT) add_.lo add1_.$(OBJEXT) \
+add1_.lo add_ui_.$(OBJEXT) add_ui_.lo add_ulp_.$(OBJEXT) add_ulp_.lo \
+agm_.$(OBJEXT) agm_.lo asin_.$(OBJEXT) asin_.lo asinh_.$(OBJEXT) \
+asinh_.lo atan_.$(OBJEXT) atan_.lo atanh_.$(OBJEXT) atanh_.lo \
+ceil_.$(OBJEXT) ceil_.lo clear_.$(OBJEXT) clear_.lo cmp_.$(OBJEXT) \
+cmp_.lo cmp2_.$(OBJEXT) cmp2_.lo cmp_abs_.$(OBJEXT) cmp_abs_.lo \
+cmp_ui_.$(OBJEXT) cmp_ui_.lo copysign_.$(OBJEXT) copysign_.lo \
+cos_.$(OBJEXT) cos_.lo cosh_.$(OBJEXT) cosh_.lo dim_.$(OBJEXT) dim_.lo \
+div_.$(OBJEXT) div_.lo div_2exp_.$(OBJEXT) div_2exp_.lo \
div_ui_.$(OBJEXT) div_ui_.lo dump_.$(OBJEXT) dump_.lo eq_.$(OBJEXT) \
-eq_.lo exp_.$(OBJEXT) exp_.lo exp2_.$(OBJEXT) exp2_.lo exp3_.$(OBJEXT) \
-exp3_.lo extract_.$(OBJEXT) extract_.lo floor_.$(OBJEXT) floor_.lo \
-get_str_.$(OBJEXT) get_str_.lo init_.$(OBJEXT) init_.lo \
-inp_str_.$(OBJEXT) inp_str_.lo isnan_.$(OBJEXT) isnan_.lo \
-log_.$(OBJEXT) log_.lo log2_.$(OBJEXT) log2_.lo mpz_set_fr_.$(OBJEXT) \
+eq_.lo euler_.$(OBJEXT) euler_.lo exceptions_.$(OBJEXT) exceptions_.lo \
+exp_.$(OBJEXT) exp_.lo exp2_.$(OBJEXT) exp2_.lo exp3_.$(OBJEXT) \
+exp3_.lo exp_2_.$(OBJEXT) exp_2_.lo expm1_.$(OBJEXT) expm1_.lo \
+extract_.$(OBJEXT) extract_.lo factorial_.$(OBJEXT) factorial_.lo \
+floor_.$(OBJEXT) floor_.lo fma_.$(OBJEXT) fma_.lo get_str_.$(OBJEXT) \
+get_str_.lo gmp_op_.$(OBJEXT) gmp_op_.lo hypot_.$(OBJEXT) hypot_.lo \
+init_.$(OBJEXT) init_.lo init2_.$(OBJEXT) init2_.lo inp_str_.$(OBJEXT) \
+inp_str_.lo isinf_.$(OBJEXT) isinf_.lo isinteger_.$(OBJEXT) \
+isinteger_.lo isnan_.$(OBJEXT) isnan_.lo isnum_.$(OBJEXT) isnum_.lo \
+log_.$(OBJEXT) log_.lo log1p_.$(OBJEXT) log1p_.lo log2_.$(OBJEXT) \
+log2_.lo log_base_10_.$(OBJEXT) log_base_10_.lo log_base_2_.$(OBJEXT) \
+log_base_2_.lo minmax_.$(OBJEXT) minmax_.lo mpz_set_fr_.$(OBJEXT) \
mpz_set_fr_.lo mul_.$(OBJEXT) mul_.lo mul_2exp_.$(OBJEXT) mul_2exp_.lo \
mul_ui_.$(OBJEXT) mul_ui_.lo neg_.$(OBJEXT) neg_.lo out_str_.$(OBJEXT) \
out_str_.lo pi_.$(OBJEXT) pi_.lo pow_.$(OBJEXT) pow_.lo \
+pow_si_.$(OBJEXT) pow_si_.lo pow_ui_.$(OBJEXT) pow_ui_.lo \
print_raw_.$(OBJEXT) print_raw_.lo print_rnd_mode_.$(OBJEXT) \
print_rnd_mode_.lo random_.$(OBJEXT) random_.lo random2_.$(OBJEXT) \
random2_.lo reldiff_.$(OBJEXT) reldiff_.lo rnd_mode_.$(OBJEXT) \
-rnd_mode_.lo round_.$(OBJEXT) round_.lo set_.$(OBJEXT) set_.lo \
-set_d_.$(OBJEXT) set_d_.lo set_dfl_prec_.$(OBJEXT) set_dfl_prec_.lo \
-set_f_.$(OBJEXT) set_f_.lo set_prc_raw_.$(OBJEXT) set_prc_raw_.lo \
-set_prec_.$(OBJEXT) set_prec_.lo set_q_.$(OBJEXT) set_q_.lo \
-set_rnd_.$(OBJEXT) set_rnd_.lo set_si_.$(OBJEXT) set_si_.lo \
-set_str_.$(OBJEXT) set_str_.lo set_str_raw_.$(OBJEXT) set_str_raw_.lo \
-set_ui_.$(OBJEXT) set_ui_.lo set_z_.$(OBJEXT) set_z_.lo \
-sin_cos_.$(OBJEXT) sin_cos_.lo sqrt_.$(OBJEXT) sqrt_.lo \
-sqrt_ui_.$(OBJEXT) sqrt_ui_.lo sub_.$(OBJEXT) sub_.lo sub_ui_.$(OBJEXT) \
-sub_ui_.lo swap_.$(OBJEXT) swap_.lo trunc_.$(OBJEXT) trunc_.lo \
-ui_div_.$(OBJEXT) ui_div_.lo ui_sub_.$(OBJEXT) ui_sub_.lo \
-urandomb_.$(OBJEXT) urandomb_.lo : $(ANSI2KNR)
+rnd_mode_.lo round_.$(OBJEXT) round_.lo save_expo_.$(OBJEXT) \
+save_expo_.lo set_.$(OBJEXT) set_.lo set_d_.$(OBJEXT) set_d_.lo \
+set_dfl_prec_.$(OBJEXT) set_dfl_prec_.lo set_f_.$(OBJEXT) set_f_.lo \
+set_prc_raw_.$(OBJEXT) set_prc_raw_.lo set_prec_.$(OBJEXT) set_prec_.lo \
+set_q_.$(OBJEXT) set_q_.lo set_rnd_.$(OBJEXT) set_rnd_.lo \
+set_si_.$(OBJEXT) set_si_.lo set_str_.$(OBJEXT) set_str_.lo \
+set_str_raw_.$(OBJEXT) set_str_raw_.lo set_ui_.$(OBJEXT) set_ui_.lo \
+set_z_.$(OBJEXT) set_z_.lo sin_.$(OBJEXT) sin_.lo sinh_.$(OBJEXT) \
+sinh_.lo sqrt_.$(OBJEXT) sqrt_.lo sqrt_ui_.$(OBJEXT) sqrt_ui_.lo \
+sub_.$(OBJEXT) sub_.lo sub1_.$(OBJEXT) sub1_.lo sub_ui_.$(OBJEXT) \
+sub_ui_.lo swap_.$(OBJEXT) swap_.lo tan_.$(OBJEXT) tan_.lo \
+tanh_.$(OBJEXT) tanh_.lo trunc_.$(OBJEXT) trunc_.lo ui_div_.$(OBJEXT) \
+ui_div_.lo ui_pow_.$(OBJEXT) ui_pow_.lo ui_pow_ui_.$(OBJEXT) \
+ui_pow_ui_.lo ui_sub_.$(OBJEXT) ui_sub_.lo urandomb_.$(OBJEXT) \
+urandomb_.lo : $(ANSI2KNR)
mpfr.info: mpfr.texi
mpfr.dvi: mpfr.texi
@@ -685,7 +776,6 @@ install-strip:
mostlyclean-generic:
clean-generic:
- -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]*
@@ -776,11 +866,6 @@ uninstall-info: uninstall-info-recursive
uninstall-info-am uninstall-info-recursive \
uninstall-libLIBRARIES uninstall-recursive
-
-floor.c: $(srcdir)/trunc.c
- cp $(srcdir)/trunc.c floor.c
-ceil.c: $(srcdir)/trunc.c
- cp $(srcdir)/trunc.c ceil.c
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
diff --git a/mpfr/mpfr.texi b/mpfr/mpfr.texi
index dd00cc87a..3c62c1963 100644
--- a/mpfr/mpfr.texi
+++ b/mpfr/mpfr.texi
@@ -32,7 +32,7 @@ END-INFO-DIR-ENTRY
@ifinfo
This file documents MPFR, a library for reliable multiple precision floating-point arithmetic
-Copyright (C) 1999, PolKA team, INRIA Lorraine and LORIA, France
+Copyright (C) 1999-2001, Free Software Foundation.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission notice
@@ -62,10 +62,10 @@ by the Foundation.
@title MPFR
@subtitle The Multiple Precision Floating-Point Reliable Library
-@subtitle Edition 1.0
-@subtitle June 1999
+@subtitle Edition 1.1
+@subtitle November 2001
-@author the PolKA project, INRIA Lorraine and LORIA
+@author the MPFR team, LORIA/INRIA Lorraine
@c Include the Distribution inside the titlepage so
@c that headings are turned off.
@@ -78,7 +78,7 @@ by the Foundation.
@page
@vskip 0pt plus 1filll
-Copyright @copyright{} 1999 The PolKA project
+Copyright @copyright{} 1999-2001 Free Software Foundation
@sp 2
@@ -189,13 +189,12 @@ floating-point
numbers (@code{double} type in C), except the range of values is much wider
(the exponent has at least 32 bits instead of 11).
-This version of MPFR is released under the GNU Library General Public
+This version of MPFR is released under the GNU Lesser General Public
License.
It is permitted to link MPFR to non-free programs, as long as when
distributing them the MPFR source code and a means to re-link with a
modified MPFR is provided.
-
@section How to use this Manual
Everyone should read @ref{MPFR Basics}. If you need to install the library
@@ -204,8 +203,7 @@ yourself, you need to read @ref{Installing MPFR}, too.
The rest of the manual can be used for later reference, although it is
probably a good idea to glance through it.
-
-@node Installing MPFR, MPFR Basics, Introduction to MPFR, Top
+@node Installing MPFR, Reporting Bugs, Introduction to MPFR, Top
@comment node-name, next, previous, up
@chapter Installing MPFR
@cindex Installation
@@ -225,8 +223,8 @@ where the directory @samp{/usr/local/gmp} is where you have installed
GNU MP.
When you install GNU MP, you have to copy the files
@samp{config.h},
-@samp{gmp-impl.h}, @samp{gmp-mparam.h},
-@samp{longlong.h} and @samp{stack-alloc.h} from the GNU MP source directory
+@samp{gmp-impl.h}, @samp{gmp-mparam.h} and
+@samp{longlong.h} from the GNU MP source directory
to @samp{/usr/local/gmp/include};
these additional files are needed by MPFR.
An alternative way is
@@ -238,7 +236,7 @@ If you get error messages, your machine might not be supported.
If you want to compile in a separate object directory, cd to that directory,
and prefix the configure command with the path to the MPFR source directory.
Not all @samp{make} programs have the necessary features to support this. In
-particular, SunOS and Slowaris @samp{make} have bugs that make them unable to
+particular, SunOS and Solaris @samp{make} have bugs that make them unable to
build from a separate object directory. Use GNU @samp{make} instead.
Also, the generated makefiles use some pattern matching rules that are not
supported by all @samp{make} programs. Again, use GNU @samp{make} instead.
@@ -307,9 +305,45 @@ MPFR suffers from all bugs from the GNU MP library, plus many many more.
Please report other problems to @samp{mpfr@@loria.fr}.
@xref{Reporting Bugs}.
+Some bug fixes are available on the MPFR web page @samp{http://www.mpfr.org}.
+
+
+@node Reporting Bugs, MPFR Basics, Installing MPFR, Top
+@comment node-name, next, previous, up
+@chapter Reporting Bugs
+@cindex Reporting bugs
+
+If you think you have found a bug in the MPFR library, first have a look on the
+MPFR web page @samp{http://www.mpfr.org/}: perhaps this bug is already known,
+in which case you will find a workaround for it.
+Otherwise, please investigate
+and report it. We have made this library available to you, and it is not to ask
+too much from you, to ask you to report the bugs that you find.
+
+There are a few things you should think about when you put your bug report
+together.
+
+You have to send us a test case that makes it possible for us to reproduce the
+bug. Include instructions on how to run the test case.
+
+You also have to explain what is wrong; if you get a crash, or if the results
+printed are incorrect and in that case, in what way.
+
+Please include compiler version information
+in your bug report. This can be extracted using @samp{what `which cc`}, or,
+if you're using gcc, @samp{gcc -v}. Also, include the output from @samp{uname
+-a}.
+
+If your bug report is good, we will do our best to help you to get a corrected
+version of the library; if the bug report is poor, we won't do anything about
+it (aside of chiding you to send better bug reports).
+
+Send your bug report to: @samp{mpfr@@loria.fr}.
+If you think something in this manual is unclear, or downright incorrect, or if
+the language needs to be improved, please send a note to the same address.
-@node MPFR Basics, Reporting Bugs, Installing MPFR, Top
+@node MPFR Basics, Floating-point Functions, Reporting Bugs, Top
@comment node-name, next, previous, up
@chapter MPFR Basics
@@ -326,12 +360,12 @@ You should include that file in any program using the MPFR library:
@cindex Floating-point number
@tindex @code{mpfr_t}
@noindent
-@dfn{Floating point number} or @dfn{Float} for short, is an arbitrary precision
+@dfn{Floating-point number} or @dfn{Float} for short, is an arbitrary precision
mantissa with a limited precision exponent. The C data type for such objects
is @code{mpfr_t}.
-A floating point number can have three special values: Not-a-Number (NaN)
+A floating-point number can have three special values: Not-a-Number (NaN)
or plus or minus Infinity. NaN represents a value which cannot be represented
-in the floating point format, like 0 divided by 0, or Infinity minus Infinity.
+in the floating-point format, like 0 divided by 0, or Infinity minus Infinity.
@cindex Precision
@@ -420,44 +454,12 @@ which can be reset with @code{mpfr_set_default_rounding_mode}.
The default rounding mode (to nearest initially).
@end deftypevr
-@section Getting the Latest Version of MP
+@section Getting the Latest Version of MPFR
The latest version of MPFR is available from
-@file{http://www.loria.fr/projets/mpfr/}.
-
-@node Reporting Bugs, Floating-point Functions, MPFR Basics, Top
-@comment node-name, next, previous, up
-@chapter Reporting Bugs
-@cindex Reporting bugs
-
-If you think you have found a bug in the MPFR library, please investigate it
-and report it. We have made this library available to you, and it is not to ask
-too much from you, to ask you to report the bugs that you find.
-
-There are a few things you should think about when you put your bug report
-together.
-
-You have to send us a test case that makes it possible for us to reproduce the
-bug. Include instructions on how to run the test case.
-
-You also have to explain what is wrong; if you get a crash, or if the results
-printed are incorrect and in that case, in what way.
-
-Please include compiler version information
-in your bug report. This can be extracted using @samp{what `which cc`}, or,
-if you're using gcc, @samp{gcc -v}. Also, include the output from @samp{uname
--a}.
-
-If your bug report is good, we will do our best to help you to get a corrected
-version of the library; if the bug report is poor, we won't do anything about
-it (aside of chiding you to send better bug reports).
-
-Send your bug report to: @samp{mpfr@@loria.fr}.
-
-If you think something in this manual is unclear, or downright incorrect, or if
-the language needs to be improved, please send a note to the same address.
+@file{http://www.mpfr.org/}.
-@node Floating-point Functions, Initializing Floats, Reporting Bugs, Top
+@node Floating-point Functions, Contributors, MPFR Basics, Top
@comment node-name, next, previous, up
@chapter Floating-point Functions
@cindex Floating-point functions
@@ -472,7 +474,7 @@ integer functions. The function prefix for floating-point operations is
There is one significant characteristic of floating-point numbers that has
motivated a difference between this function class and other MPFR function
-classes: the inherent inexactness of floating point arithmetic. The user has
+classes: the inherent inexactness of floating-point arithmetic. The user has
to specify the precision of each variable. A computation that assigns a
variable will take place with the precision of the assigned variable; the
cost of that computation should not depend from the
@@ -494,7 +496,8 @@ computer should not differ from the results obtained on a computer with a
different word size.
@menu
-* Rounding Modes
+* Rounding Modes::
+* Exceptions::
* Initializing Floats::
* Assigning Floats::
* Simultaneous Float Init & Assign::
@@ -505,7 +508,8 @@ different word size.
* Miscellaneous Float Functions::
@end menu
-@cindex Rouding modes
+@node Rounding Modes, Exceptions, Floating-point Functions, Floating-point Functions
+@cindex Rounding modes
@section Rounding Modes
The following four rounding modes are supported:
@@ -516,41 +520,109 @@ The following four rounding modes are supported:
@item @code{GMP_RNDD}: round towards minus infinity
@end itemize
The @samp{round to nearest} mode works as in the IEEE P754 standard: in case
-the number to be rounded lies exactly in the middle of two reprensentable
+the number to be rounded lies exactly in the middle of two representable
numbers, it is rounded to the one with the least significant bit set to zero.
For example, the number 5, which is represented by (101) in binary, is rounded
to (100)=4 with a precision of two bits, and not to (110)=6.
-This rule avoids the @dfn{drift} phenomena mentioned by Knuth in volume 2
+This rule avoids the @dfn{drift} phenomenon mentioned by Knuth in volume 2
of The Art of Computer Programming (section 4.2.2, pages 221-222).
+Most MPFR functions take as first argument the destination variable,
+as second and following arguments the input variables,
+as last argument a rounding mode, and
+have a return value of type @code{int}. If this value is zero, it means
+that the value stored in the destination variable is the exact result of
+the corresponding mathematical function. If the returned value is positive
+(resp. negative), it means the value stored in the destination variable
+is greater (resp. lower) than the exact result.
+For example with the @code{GMP_RNDU} rounding mode, the returned value
+is usually positive, except when the result is exact, in which case it is
+zero.
+In the case of an infinite result, it is considered as inexact when it was
+obtained by overflow, and exact otherwise.
+A NaN result (Not-a-Number) always corresponds to an inexact return value.
+
@deftypefun void mpfr_set_default_rounding_mode (mp_rnd_t @var{rnd})
Sets the default rounding mode to @var{rnd}.
The default rounding mode is to nearest initially.
@end deftypefun
-@deftypefun void mpfr_round (mpfr_t @var{x}, mp_rnd_t @var{rnd}, mp_prec_t @var{prec})
-Round @var{x} according to @var{rnd} with precision @var{prec}, which
+@deftypefun int mpfr_round (mpfr_t @var{x}, mp_rnd_t @var{rnd}, mp_prec_t @var{prec})
+Rounds @var{x} according to @var{rnd} with precision @var{prec}, which
may be different from that of @var{x}.
If @var{prec} is greater or equal to the precision of @var{x}, then new
space is allocated for the mantissa, and it is filled with zeroes.
Otherwise, the mantissa is rounded to precision @var{prec} with the given
direction. In both cases, the precision of @var{x} is changed to @var{prec}.
+The returned value is zero when the result is exact, positive when it is
+greater than the original value of @var{x}, and negative when it is smaller.
@end deftypefun
-@deftypefun void mpfr_set_machine_rnd_mode (mp_rnd_t @var{rnd})
-Set the machine rounding mode to @var{rnd}.
-This function is useful for debugging purpose, but
-also as a common interface to all different ways of setting the
-rounding mode, which unfortunately differ from one operating system to
-another one.
-@end deftypefun
+@c @deftypefun void mpfr_set_machine_rnd_mode (mp_rnd_t @var{rnd})
+@c Set the machine rounding mode to @var{rnd}.
+@c This function is useful for debugging purpose, but
+@c also as a common interface to all different ways of setting the
+@c rounding mode, which unfortunately differ from one operating system to
+@c another one.
+@c @end deftypefun
@deftypefun {char *} mpfr_print_rnd_mode (mp_rnd_t @var{rnd})
Returns the input string (GMP_RNDD, GMP_RNDU, GMP_RNDN, GMP_RNDZ)
corresponding to the rounding mode @var{rnd}.
@end deftypefun
-@node Initializing Floats, Assigning Floats, Floating-point Functions, Floating-point Functions
+@node Exceptions, Initializing Floats, Rounding Modes, Floating-point Functions
+@comment node-name, next, previous, up
+@section Exceptions
+
+@deftypefun mp_exp_t mpfr_get_emin (void)
+@deftypefunx mp_exp_t mpfr_get_emax (void)
+Return the (current) smallest and largest exponents allowed for a
+floating-point variable.
+@end deftypefun
+
+@deftypefun int mpfr_set_emin (mp_exp_t @var{exp})
+@deftypefunx int mpfr_set_emax (mp_exp_t @var{exp})
+Set the smallest and largest exponents allowed for a floating-point variable.
+Return a non-zero value when @var{exp} is not in the range accepted by the
+implementation (in that case the smallest or largest exponent is not changed),
+and zero otherwise.
+If the user changes the exponent range, it is her/his responsibility to check
+that all current floating-point variables are in the new allowed range
+(for example using @code{mpfr_check_range},
+otherwise the subsequent
+behaviour will be undefined, in the sense of the ISO C standard.
+@end deftypefun
+
+@deftypefun int mpfr_check_range (mpfr_t @var{x}, mp_rnd_t @var{rnd})
+Return zero if the exponent of @var{x} is in the current allowed range
+(see @code{mpfr_get_emin} and @code{mpfr_get_emax}),
+otherwise reset @var{x} according to the current floating-point system
+and the rounding mode @var{rnd}, and return a positive value if the
+rounded result is larger than the original one, a negative value otherwise
+(the result cannot be exact in that case).
+@end deftypefun
+
+@deftypefun void mpfr_clear_underflow (void)
+@deftypefunx void mpfr_clear_overflow (void)
+@deftypefunx void mpfr_clear_nanflag (void)
+@deftypefunx void mpfr_clear_inexflag (void)
+Clear the underflow, overflow, invalid, and inexact flags.
+@end deftypefun
+
+@deftypefun void mpfr_clear_flags (void)
+Clear all global flags (underflow, overflow, inexact, invalid).
+@end deftypefun
+
+@deftypefun int mpfr_underflow_p (void)
+@deftypefunx int mpfr_overflow_p (void)
+@deftypefunx int mpfr_nanflag_p (void)
+@deftypefunx int mpfr_inexflag_p (void)
+Return the corresponding (underflow, overflow, invalid, inexact) flag,
+which is non-zero iff the flag is set.
+@end deftypefun
+
+@node Initializing Floats, Assigning Floats, Exceptions, Floating-point Functions
@comment node-name, next, previous, up
@section Initialization and Assignment Functions
@@ -613,12 +685,14 @@ calculation. A typical use would be for adjusting the precision gradually in
iterative algorithms like Newton-Raphson, making the computation precision
closely match the actual accurate part of the numbers.
-@deftypefun void mpfr_set_prec (mpfr_t @var{x}, mp_prec_t @var{prec})
+@deftypefun int mpfr_set_prec (mpfr_t @var{x}, mp_prec_t @var{prec})
Reset the precision of @var{x} to be @strong{exactly} @var{prec} bits.
The previous value stored in @var{x} is lost. It is equivalent to
a call to @code{mpfr_clear(x)} followed by a call to
@code{mpfr_init2(x, prec)}, but more efficient as no allocation is done in
case the current allocated space for the mantissa of @var{x} is enough.
+It is not allowed to set @var{prec} to zero: in that case, a non-zero value
+is returned, as well as when the allocation fails.
In case you want to keep the previous value stored in @var{x},
use @code{mpfr_round} instead.
@@ -644,16 +718,24 @@ space for @var{x}. Otherwise an error will occur.
These functions assign new values to already initialized floats
(@pxref{Initializing Floats}).
-@deftypefun void mpfr_set (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
-@deftypefunx void mpfr_set_ui (mpfr_t @var{rop}, unsigned long int @var{op}, mp_rnd_t @var{rnd})
-@deftypefunx void mpfr_set_si (mpfr_t @var{rop}, long int @var{op}, mp_rnd_t @var{rnd}
-@deftypefunx void mpfr_set_d (mpfr_t @var{rop}, double @var{op}, mp_rnd_t @var{rnd})
-@deftypefunx void mpfr_set_z (mpfr_t @var{rop}, mpz_t @var{op}, mp_rnd_t @var{rnd})
-@deftypefunx void mpfr_set_q (mpfr_t @var{rop}, mpq_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefun int mpfr_set (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_set_ui (mpfr_t @var{rop}, unsigned long int @var{op}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_set_si (mpfr_t @var{rop}, long int @var{op}, mp_rnd_t @var{rnd}
+@deftypefunx int mpfr_set_d (mpfr_t @var{rop}, double @var{op}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_set_z (mpfr_t @var{rop}, mpz_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_set_q (mpfr_t @var{rop}, mpq_t @var{op}, mp_rnd_t @var{rnd})
Set the value of @var{rop} from @var{op}, rounded to the precision of @var{rop}
towards the given direction @var{rnd}.
Please note that even a @code{long int} may have to be rounded,
if the destination precision is less than the machine word width.
+The return value is zero when @var{rop}=@var{op}, positive when
+@var{rop}>@var{op},
+and negative when @var{rop}<@var{op}.
+For @code{mpfr_set_d}, be careful that the input number @var{op}
+may not be exactly representable as a double-precision number (this happens for
+0.1 for instance), in which case it is first
+rounded by the C compiler to a double-precision number, and then only
+to a mpfr floating-point number.
@end deftypefun
@deftypefun int mpfr_set_str (mpfr_t @var{x}, char *@var{s}, int @var{base}, mp_rnd_t @var{rnd})
@@ -676,10 +758,12 @@ if it starts with @code{I} after the sign, it is interpreted as infinity,
with the corresponding sign.
@end deftypefun
-@deftypefun void mpfr_set_f (mpfr_t @var{x}, mpf_t @var{y}, mp_rnd_t @var{rnd})
+@deftypefun int mpfr_set_f (mpfr_t @var{x}, mpf_t @var{y}, mp_rnd_t @var{rnd})
Set @var{x} to the GNU MP floating-point number
@var{y}, rounded with the @var{rnd} mode and the precision
of @var{x}.
+The returned value is zero when @var{x}=@var{y}, positive when @var{x}>@var{y},
+and negative when @var{x}<@var{y}.
@end deftypefun
@deftypefun void mpfr_swap (mpfr_t @var{x}, mpfr_t @var{y})
@@ -694,14 +778,19 @@ using a third auxiliary variable.
@subsection Combined Initialization and Assignment Functions
@cindex Initialization and assignment functions
-@deftypefn Macro void mpfr_init_set (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
-@deftypefnx Macro void mpfr_init_set_ui (mpfr_t @var{rop}, unsigned long int @var{op}, mp_rnd_t @var{rnd})
-@deftypefnx Macro void mpfr_init_set_si (mpfr_t @var{rop}, signed long int @var{op}, mp_rnd_t @var{rnd})
-@deftypefnx Macro void mpfr_init_set_d (mpfr_t @var{rop}, double @var{op}, mp_rnd_t @var{rnd})
+@deftypefn Macro int mpfr_init_set (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefnx Macro int mpfr_init_set_ui (mpfr_t @var{rop}, unsigned long int @var{op}, mp_rnd_t @var{rnd})
+@deftypefnx Macro int mpfr_init_set_si (mpfr_t @var{rop}, signed long int @var{op}, mp_rnd_t @var{rnd})
+@deftypefnx Macro int mpfr_init_set_d (mpfr_t @var{rop}, double @var{op}, mp_rnd_t @var{rnd})
+@deftypefnx Macro int mpfr_init_set_f (mpfr_t @var{rop}, double @var{op}, mp_rnd_t @var{rnd})
+@deftypefnx Macro int mpfr_init_set_z (mpfr_t @var{rop}, mpz_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefnx Macro int mpfr_init_set_q (mpfr_t @var{rop}, mpq_t @var{op}, mp_rnd_t @var{rnd})
Initialize @var{rop} and set its value from @var{op}, rounded to direction
@var{rnd}.
The precision of @var{rop} will be taken from the active default precision,
as set by @code{mpfr_set_default_prec}.
+The return value if zero if @var{rop}=@var{op}, positive if @var{rop}>@var{op},
+and negative when @var{rop}<@var{op}.
@end deftypefn
@deftypefun int mpfr_init_set_str (mpfr_t @var{x}, char *@var{s}, int @var{base}, mp_rnd_t @var{rnd})
@@ -738,7 +827,7 @@ allocation function, and a pointer to the string is returned.
In that case, the user should her/himself free the corresponding memory
with @code{(*_mp_free_func)(s, strlen(s) + 1)}.
-If @var{str} is not NULL, it should point to a block of storage enough large
+If @var{str} is not NULL, it should point to a block of storage large enough
for the mantissa, i.e., @var{n_digits} + 2. The two extra bytes are for a
possible minus sign, and for the terminating null character.
@@ -746,7 +835,7 @@ The exponent is written through the pointer @var{expptr}.
If @var{n_digits} is 0, note that the space
requirements for @var{str} in this case will be impossible for the user to
-predetermine. Therefore, you need to pass NULL for the string argument
+predetermine. Therefore, one needs to pass NULL for the string argument
whenever @var{n_digits} is 0.
The generated string is a fraction, with an implicit radix point immediately
@@ -761,8 +850,10 @@ returned as "31416" in the string and 1 written at @var{expptr}.
@cindex Float arithmetic functions
@cindex Arithmetic functions
-@deftypefun void mpfr_add (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
-@deftypefunx void mpfr_add_ui (mpfr_t @var{rop}, mpfr_t @var{op1}, unsigned long int @var{op2}, mp_rnd_t @var{rnd})
+@deftypefun int mpfr_add (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_add_ui (mpfr_t @var{rop}, mpfr_t @var{op1}, unsigned long int @var{op2}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_add_z (mpfr_t @var{rop}, mpfr_t @var{op1}, mpz_t @var{op2}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_add_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mp_rnd_t @var{rnd})
@ifinfo
Set @var{rop} to @var{op1} + @var{op2} rounded in the direction @var{rnd}.
@end ifinfo
@@ -771,16 +862,26 @@ Set @var{rop} to @var{op1} + @var{op2} rounded in the direction @var{rnd}.
Set @var{rop} to $@var{op1} + @var{op2}$ rounded in the direction @var{rnd}.
@end tex
@end iftex
+The return value is zero if @var{rop} is exactly @var{op1} + @var{op2},
+positive if @var{rop} is larger than @var{op1} + @var{op2},
+and negative if @var{rop} is smaller than @var{op1} + @var{op2}.
@end deftypefun
-@deftypefun void mpfr_sub (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
-@deftypefunx void mpfr_ui_sub (mpfr_t @var{rop}, unsigned long int @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
-@deftypefunx void mpfr_sub_ui (mpfr_t @var{rop}, mpfr_t @var{op1}, unsigned long int @var{op2}, mp_rnd_t @var{rnd})
+@deftypefun int mpfr_sub (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_ui_sub (mpfr_t @var{rop}, unsigned long int @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_sub_ui (mpfr_t @var{rop}, mpfr_t @var{op1}, unsigned long int @var{op2}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_sub_z (mpfr_t @var{rop}, mpfr_t @var{op1}, mpz_t @var{op2}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_sub_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mp_rnd_t @var{rnd})
Set @var{rop} to @var{op1} @minus{} @var{op2} rounded in the direction @var{rnd}.
+The return value is zero if @var{rop} is exactly @var{op1} @minus{} @var{op2},
+positive if @var{rop} is larger than @var{op1} @minus{} @var{op2},
+and negative if @var{rop} is smaller than @var{op1} @minus{} @var{op2}.
@end deftypefun
-@deftypefun void mpfr_mul (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
-@deftypefunx void mpfr_mul_ui (mpfr_t @var{rop}, mpfr_t @var{op1}, unsigned long int @var{op2}, mp_rnd_t @var{rnd})
+@deftypefun int mpfr_mul (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_mul_ui (mpfr_t @var{rop}, mpfr_t @var{op1}, unsigned long int @var{op2}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_mul_z (mpfr_t @var{rop}, mpfr_t @var{op1}, mpz_t @var{op2}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_mul_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mp_rnd_t @var{rnd})
@ifinfo
Set @var{rop} to @var{op1} times @var{op2} rounded in the direction @var{rnd}.
@end ifinfo
@@ -789,6 +890,8 @@ Set @var{rop} to @var{op1} times @var{op2} rounded in the direction @var{rnd}.
Set @var{rop} to $@var{op1} \times @var{op2}$ rounded in the direction @var{rnd}.
@end tex
@end iftex
+Return 0 if the result is exact, a positive value if
+@var{rop}>@var{op1}*@var{op2}, a negative value otherwise.
@end deftypefun
Division is undefined if the divisor is zero, and passing a zero divisor to
@@ -796,12 +899,15 @@ the divide functions will make these functions intentionally divide by zero.
This gives the user the possibility to handle arithmetic exceptions in these
functions in the same manner as other arithmetic exceptions.
-@deftypefun void mpfr_div (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
-@deftypefunx void mpfr_ui_div (mpfr_t @var{rop}, unsigned long int @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
+@deftypefun int mpfr_div (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_ui_div (mpfr_t @var{rop}, unsigned long int @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
@deftypefunx int mpfr_div_ui (mpfr_t @var{rop}, mpfr_t @var{op1}, unsigned long int @var{op2}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_div_z (mpfr_t @var{rop}, mpfr_t @var{op1}, mpz_t @var{op2}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_div_q (mpfr_t @var{rop}, mpfr_t @var{op1}, mpq_t @var{op2}, mp_rnd_t @var{rnd})
Set @var{rop} to @var{op1}/@var{op2} rounded in the direction @var{rnd}.
-@code{mpfr_div_ui} returns 0 if the division is exact,
-a non-zero value otherwise.
+These functions return 0 if the division is exact,
+a positive value when @var{rop} is larger than @var{op1} divided by @var{op2},
+and a negative value otherwise.
@end deftypefun
@deftypefun int mpfr_sqrt (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
@@ -821,26 +927,48 @@ Return 0 if the operation is exact, a non-zero value otherwise.
@deftypefun int mpfr_pow_ui (mpfr_t @var{rop}, mpfr_t @var{op1}, unsigned long int @var{op2}, mp_rnd_t @var{rnd})
@deftypefunx int mpfr_ui_pow_ui (mpfr_t @var{rop}, unsigned long int @var{op1}, unsigned long int @var{op2}, mp_rnd_t @var{rnd})
Set @var{rop} to @var{op1} raised to @var{op2}. The computation is done by
-binary exponentiation, each multiplication being rounded to direction
-@var{rnd}. Hence the relative error with respect to the exact result may be
-larger than one unit in last place (ulp). In other words, this function does
-not provide an exact rounding.
-The returned value @var{k} is such that the error in ulps on the result
-is less than 2 power @var{k}.
+binary exponentiation.
+Return 0 if the result is exact, a non-zero value otherwise (but the sign
+of the return value has no meaning).
+@end deftypefun
+
+@deftypefun int mpfr_ui_pow (mpfr_t @var{rop}, unsigned long int @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
+Set @var{rop} to @var{op1} raised to @var{op2},
+rounded to the direction @var{rnd} with the precision of @var{rop}.
+Return zero iff the result is exact, a positive value when the
+result is greater than @var{op1} to the power @var{op2}, and a negative value
+when it is smaller.
+@end deftypefun
+
+@deftypefun int mpfr_pow_si (mpfr_t @var{rop}, mpfr_t @var{op1}, long int @var{op2}, mp_rnd_t @var{rnd})
+Set @var{rop} to @var{op1} raised to the power @var{op2},
+rounded to the direction @var{rnd} with the
+precision of @var{rop}.
+Return zero iff the result is exact.
+@end deftypefun
+
+@deftypefun int mpfr_pow (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
+Set @var{rop} to @var{op1} raised to the power @var{op2},
+rounded to the direction @var{rnd} with the precision of @var{rop}.
+If @var{op1} is negative then @var{rop} is set to NaN,
+even if @var{op2} is an integer.
+Return zero iff the result is exact.
@end deftypefun
-@deftypefun void mpfr_neg (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefun int mpfr_neg (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
Set @var{rop} to @minus{}@var{op} rounded in the direction @var{rnd}.
Just changes the sign
if @var{rop} and @var{op} are the same variable.
@end deftypefun
-@deftypefun void mpfr_abs (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefun int mpfr_abs (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
Set @var{rop} to the absolute value of @var{op},
rounded in the direction @var{rnd}.
+Return 0 if the result is exact, a positive value if @var{rop} is larger than
+the absolute value of @var{op}, and a negative value otherwise.
@end deftypefun
-@deftypefun void mpfr_mul_2exp (mpfr_t @var{rop}, mpfr_t @var{op1}, unsigned long int @var{op2}, mp_rnd_t @var{rnd})
+@deftypefun int mpfr_mul_2exp (mpfr_t @var{rop}, mpfr_t @var{op1}, unsigned long int @var{op2}, mp_rnd_t @var{rnd})
@ifinfo
Set @var{rop} to @var{op1} times 2 raised to @var{op2}
@end ifinfo
@@ -851,19 +979,23 @@ Set @var{rop} to $@var{op1} \times 2^{op2}$
@end iftex
rounded to the direction @var{rnd}. Just increases the exponent by @var{op2}
when @var{rop} and @var{op1} are identical.
+Return zero when @var{rop}=@var{op1}, a positive value when @var{rop}>@var{op1},
+and a negative value when @var{rop}<@var{op1}.
@end deftypefun
-@deftypefun void mpfr_div_2exp (mpfr_t @var{rop}, mpfr_t @var{op1}, unsigned long int @var{op2}, mp_rnd_t @var{rnd})
+@deftypefun int mpfr_div_2exp (mpfr_t @var{rop}, mpfr_t @var{op1}, unsigned long int @var{op2}, mp_rnd_t @var{rnd})
@ifinfo
-Set @var{rop} to @var{op1} divided by 2 raised to @var{op2}.
+Set @var{rop} to @var{op1} divided by 2 raised to @var{op2}
@end ifinfo
@iftex
@tex
-Set @var{rop} to $@var{op1}/2^{op2}$.
+Set @var{rop} to $@var{op1}/2^{op2}$
@end tex
@end iftex
rounded to the direction @var{rnd}. Just decreases the exponent by @var{op2}
when @var{rop} and @var{op1} are identical.
+Return zero when @var{rop}=@var{op1}, a positive value when @var{rop}>@var{op1},
+and a negative value when @var{rop}<@var{op1}.
@end deftypefun
@node Float Comparison, I/O of Floats, Float Arithmetic, Floating-point Functions
@@ -902,7 +1034,7 @@ Compare @var{op1} and @var{op2} multiplied by two to the power @var{e}.
@deftypefun int mpfr_eq (mpfr_t @var{op1}, mpfr_t @var{op2}, unsigned long int op3)
Return non-zero if the first @var{op3} bits of @var{op1} and @var{op2} are
-equal, zero otherwise. I.e., test of @var{op1} and @var{op2} are
+equal, zero otherwise. I.e., tests if @var{op1} and @var{op2} are
approximately equal.
@end deftypefun
@@ -923,44 +1055,15 @@ nor plus or minus infinity.
Compute the relative difference between @var{op1} and @var{op2}
and store the result in @var{rop}.
This function does not guarantee the exact rounding on the relative difference;
-it just computes @code{abs(@var{op1}-@var{op2})/@var{op1}}, using the rounding mode
-@var{rnd} for all operations.
+it just computes abs(@var{op1}@minus{}@var{op2})/@var{op1}, using the
+rounding mode @var{rnd} for all operations.
@end deftypefun
-@deftypefn Macro int mpfr_sgn (mpfr_t @var{op})
-@ifinfo
-Return +1 if @var{op} > 0, 0 if @var{op} = 0, and @minus{}1 if @var{op} < 0.
-@end ifinfo
-@iftex
-@tex
-Return $+1$ if $@var{op} > 0$, $0$ if $@var{op} = 0$,
-and $-1$ if $@var{op} < 0$.
-@end tex
-@end iftex
-This function is actually implemented as a macro. It evaluates its
-arguments multiple times.
-It is provided for compatibility with @var{mpf}.
-@end deftypefn
-
-@deftypefn Macro int SIGN (mpfr_t @var{op})
-@ifinfo
-Return +1 if @var{op} > 0, and @minus{}1 if @var{op} < 0.
-@end ifinfo
-@iftex
-@tex
-Return $+1$ if $@var{op} > 0$, and $-1$ if $@var{op} < 0$.
-@end tex
-@end iftex
-This function is actually implemented as a macro. It evaluates its
-arguments multiple times.
-As in the IEEE 754 standard, there is a positive zero and a negative one,
-therefore the @var{SIGN} macro does not distinguish zero from non-zero
-numbers.
-@end deftypefn
-
-@deftypefn Macro int MPFR_NOTZERO (mpfr_t @var{op})
-Returns zero when its argument is zero, and a non-zero value otherwise.
-@end deftypefn
+@deftypefun int mpfr_sgn (mpfr_t @var{op})
+Return a positive value if @var{op} > 0, zero if @var{op} = 0,
+and a negative value if @var{op} < 0.
+Its result is not specified when @var{op} is NaN (Not-a-Number).
+@end deftypefun
@section Special Functions
@cindex Special functions
@@ -968,24 +1071,89 @@ Returns zero when its argument is zero, and a non-zero value otherwise.
@deftypefun int mpfr_log (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
Set @var{rop} to the natural logarithm of @var{op},
rounded to the direction @var{rnd} with the precision of @var{rop}.
-Return 0 iff the result is exact (this occurs in fact only when @var{op} is 1
-i.e. the result is 0).
+Return zero when the result is exact
+(this occurs in fact only when @var{op} is 0, 1, or +infinity)
+and a non-zero value otherwise (except for rounding to nearest,
+the sign of the return value is that of @var{rop}-log(@var{op}).
@end deftypefun
@deftypefun int mpfr_exp (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
Set @var{rop} to the exponential of @var{op},
rounded to the direction @var{rnd} with the precision of @var{rop}.
+Return zero when the result is exact
+(this occurs in fact only when @var{op} is -infinity, 0, or +infinity),
+a positive value when the result is greater than the exponential of @var{op},
+and a negative value when it is smaller.
+@end deftypefun
+
+@deftypefun int mpfr_exp2 (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+Set @var{rop} to 2 power of @var{op},
+rounded to the direction @var{rnd} with the precision of @var{rop}.
+Return zero iff the result is exact (this occurs in fact only when @var{op}
+is -infinity, 0, or +infinity),
+a positive value when the result is greater than the exponential of @var{op},
+and a negative value when it is smaller.
+@end deftypefun
+
+@deftypefun int mpfr_cos (mpfr_t @var{cop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_sin (mpfr_t @var{sop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_tan (mpfr_t @var{top}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+Set @var{cop} to the cosine of @var{op}, @var{sop} to the sine of @var{op},
+@var{top} to the tangent of @var{op}, rounded to the direction @var{rnd} with
+the precision of @var{rop}. Return 0 iff the result is exact (this occurs
+in fact only when @var{op} is 0 i.e. the sine is 0, the cosine is 1, and the
+tangent is 0).
+@end deftypefun
+
+@deftypefun int mpfr_cosh (mpfr_t @var{cop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_sinh (mpfr_t @var{sop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_tanh (mpfr_t @var{top}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+Set @var{cop} to the hyperbolic cosine of @var{op},
+ @var{sop} to the hyperbolic sine of @var{op},
+ @var{top} to the hyperbolic tangent of @var{op},
+rounded to the direction @var{rnd} with the precision of @var{rop}.
Return 0 iff the result is exact (this occurs in fact only when @var{op} is 0
i.e. the result is 1).
@end deftypefun
-@deftypefun int mpfr_sin_cos (mpfr_t @var{sop}, mpfr_t @var{cop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
-Set @var{sop} to the sinus of @var{op}, @var{cop} to the cosinus of @var{op},
+@deftypefun int mpfr_acosh (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_asinh (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_atanh (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+Set @var{rop} to the inverse hyperbolic cosine, sine or tangent of @var{op},
+rounded to the direction @var{rnd} with the precision of @var{rop}.
+Return 0 iff the result is exact.
+@end deftypefun
+
+@deftypefun int mpfr_fac_ui (mpfr_t @var{rop}, unsigned long int @var{op}, mp_rnd_t @var{rnd})
+Set @var{rop} to the factorial of the unsigned long int @var{op},
+rounded to the direction @var{rnd} with the precision of @var{rop}.
+Return 0 iff the result is exact.
+@end deftypefun
+
+@deftypefun int mpfr_log1p (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+Set @var{rop} to the logarithm of one plus @var{op},
rounded to the direction @var{rnd} with the precision of @var{rop}.
-@var{sop} and @var{cop} must be different variables.
-If one of @var{sop} or @var{cop} is NULL, only the other value is returned.
-Return 0 iff the results are exact (this occurs in fact only when @var{op} is 0
-i.e. the sine is 0 and the cosine is 1).
+Return 0 iff the result is exact (this occurs in fact only when @var{op} is 0
+i.e. the result is 0).
+@end deftypefun
+
+@deftypefun int mpfr_expm1 (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+Set @var{rop} to the exponential of @var{op} minus one,
+rounded to the direction @var{rnd} with the precision of @var{rop}.
+Return 0 iff the result is exact (this occurs in fact only when @var{op} is 0
+i.e. the result is 0).
+@end deftypefun
+
+@deftypefun int mpfr_log2 (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_log10 (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+Set @var{rop} to the log[t] (t=2 or 10)(log x / log t) of @var{op}, rounded to the direction @var{rnd} with the precision of @var{rop}. Return 0 iff the result is exact (this occurs in fact only when @var{op} is 1 i.e. the result is 0).
+@end deftypefun
+
+@deftypefun int mpfr_fma (mpfr_t @var{rop}, mpfr_t @var{opx},mpfr_t @var{opy},mpfr_t @var{opz}, mp_rnd_t @var{rnd})
+Set @var{rop} to @var{opx} * @var{opy} + @var{opz}, rounded to the direction
+@var{rnd} with the precision of @var{rop}. Return 0 iff the result is exact,
+a positive value if @var{rop} is larger than @var{opx} * @var{opy} + @var{opz},
+and a negative value otherwise.
@end deftypefun
@deftypefun void mpfr_agm (mpfr_t @var{rop}, mpfr_t @var{op1}, mpfr_t @var{op2}, mp_rnd_t @var{rnd})
@@ -993,6 +1161,14 @@ Set @var{rop} to the arithmetic-geometric mean of @var{op1} and @var{op2},
rounded to the direction @var{rnd} with the precision of @var{rop}.
@end deftypefun
+@deftypefun int mpfr_asin (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+@deftypefunx int mpfr_atan (mpfr_t @var{rop}, mpfr_t @var{op}, mp_rnd_t @var{rnd})
+Set @var{rop} to the arc-sine or arc-tangent of @var{op},
+rounded to the direction @var{rnd} with the precision of @var{rop}.
+Return 0 iff the result is exact (this occurs in fact only when @var{op} is 0
+i.e. the result is 0).
+@end deftypefun
+
@deftypefun void mpfr_const_log2 (mpfr_t @var{rop}, mp_rnd_t @var{rnd})
Set @var{rop} to the logarithm of 2 rounded to the direction @var{rnd}
with the precision of @var{rop}. This function stores the computed
@@ -1006,6 +1182,11 @@ with the precision of @var{rop}. This function uses the Borwein, Borwein,
Plouffe formula which directly gives the expansion of Pi in base 16.
@end deftypefun
+@deftypefun void mpfr_const_euler (mpfr_t @var{rop}, mp_rnd_t @var{rnd})
+Set @var{rop} to the value of Euler's constant 0.577...
+rounded to the direction @var{rnd} with the precision of @var{rop}.
+@end deftypefun
+
@node I/O of Floats, Miscellaneous Float Functions, Float Comparison, Floating-point Functions
@comment node-name, next, previous, up
@section Input and Output Functions
@@ -1014,8 +1195,10 @@ Plouffe formula which directly gives the expansion of Pi in base 16.
@cindex Output functions
@cindex I/O functions
-Functions that perform input from a stdio stream, and functions that output to
-a stdio stream. Passing a NULL pointer for a @var{stream} argument to any of
+Functions that perform input from a standard input/output
+stream, and functions that output to
+a standard input/output stream.
+Passing a NULL pointer for a @var{stream} argument to any of
these functions will make them read from @code{stdin} and write to
@code{stdout}, respectively.
@@ -1050,7 +1233,7 @@ exponent is
@c either in the specified base or, if @var{base} is negative,
in decimal.
-The argument @var{base} may be in the ranges 2 to 36.
+The argument @var{base} may be in the range 2 to 36.
@c , or @minus{}36 to
@c @minus{}2. Negative values are used to specify that the exponent is in
@c decimal.
@@ -1076,7 +1259,7 @@ they should always be zero.
@c @end deftypefun
-@node Miscellaneous Float Functions, Contributors, I/O of Floats, Floating-point Functions
+@node Miscellaneous Float Functions, , I/O of Floats, Floating-point Functions
@comment node-name, next, previous, up
@section Miscellaneous Functions
@cindex Miscellaneous float functions
@@ -1095,19 +1278,16 @@ Generate a uniformly distributed random float in the interval 0 <= X < 1.
@deftypefun void mpfr_random (mpfr_t @var{rop})
Put in @var{rop} a random float in the interval [0,1[.
-Random limbs are generated using the
-@code{random} system function.
-zeros and ones in the binary representation. The exponent of the number is in
-the interval @minus{}@var{exp} to @var{exp}. This function is useful for
-testing functions and algorithms, since this kind of random numbers have
-proven to be more likely to trigger corner-case bugs. Negative random numbers
-are generated when @var{max_size} is negative.
+Random limbs are generated using the @code{random} system function.
@end deftypefun
@deftypefun void mpfr_random2 (mpfr_t @var{rop}, mp_size_t @var{max_size}, mp_exp_t @var{max_exp})
Generate a random float of at most @var{max_size} limbs, with long strings of
zeros and ones in the binary representation. The exponent of the number is in
the interval @minus{}@var{exp} to @var{exp}.
+This function is useful for
+testing functions and algorithms, since this kind of random numbers have
+proven to be more likely to trigger corner-case bugs.
Negative random numbers are generated when @var{max_size} is negative.
@end deftypefun
@@ -1126,34 +1306,6 @@ These functions were mainly designed for the implementation of @code{mpfr},
but may be useful for users too.
You need to include @code{mpfr-impl.h} to use them.
-@deftypefun Macro int MPFR_IS_NAN (mpfr_t x)
-Returns a non-zero value iff its argument is @samp{Not a Number}.
-@end deftypefun
-
-@deftypefun Macro int MPFR_SET_NAN (mpfr_t x)
-Sets its argument to @samp{Not a Number}.
-@end deftypefun
-
-@deftypefun Macro int MPFR_ABSSIZE (mpfr_t x)
-Returns the number of limb the mantissa of @var{x} points to.
-@end deftypefun
-
-@deftypefun Macro int MPFR_EXP (mpfr_t x)
-Returns the exponent of @var{x}.
-@end deftypefun
-
-@deftypefun Macro mp_limb_t* MPFR_MANT (mpfr_t x)
-Returns a pointer to the mantissa of @var{x}.
-@end deftypefun
-
-@deftypefun Macro mp_prec_t MPFR_PREC (mpfr_t x)
-Returns the precision of @var{x}.
-@end deftypefun
-
-@deftypefun Macro int MPFR_CHANGE_SIGN (mpfr_t x)
-Changes the sign of @var{x}.
-@end deftypefun
-
@deftypefun int mpfr_add_one_ulp (mpfr_t @var{x})
Add one unit in last place (ulp) to the mantissa of @var{x}
if it is positive or zero, and subtracts one ulp otherwise.
@@ -1166,24 +1318,6 @@ and adds one ulp otherwise.
Always return 0 (result is exact).
@end deftypefun
-@deftypefun int mpfr_round_raw (mp_limb_t* @var{y}, mp_limb_t* @var{x}, mp_prec_t @var{xprec}, int @var{neg}, mp_prec_t @var{yprec}, mp_rnd_t @var{rnd})
-Puts in mantissa beginning at @var{y} the value of that
-beginning at @var{x} (with precision @var{xprec} bits and negative iff
-@var{neg} is not zero)
-rounded with mode @var{rnd} to precision @var{yprec}.
-@end deftypefun
-
-@deftypefun int mpfr_round_raw2 (mp_limb_t* @var{x}, mp_prec_t @var{xn}, int @var{neg}, mp_rnd_t @var{rnd}, mp_prec_t @var{prec})
-Returns 0 if the multiple precision number stored in the @var{xn} limbs
-starting at @var{xp} (least significant limbs first) with sign @var{neg}
-(positive iff @var{neg} equals zero)
-is rounded similarly with direction @var{rnd} and precision @var{prec}
-than towards zero, and 1 otherwise.
-In other words, the bit returned is what has to be added to bit @var{prec}
-to round to mode @var{rnd}. This function @strong{does not modify} the
-mantissa stored in @var{xp}.
-@end deftypefun
-
@deftypefun int mpfr_can_round (mpfr_t @var{b}, mp_prec_t @var{err}, mp_rnd_t @var{rnd1}, mp_rnd_t @var{rnd2}, mp_prec_t @var{prec})
Assuming @var{b} is an approximation of an unknown number
@var{x} in direction @var{rnd1} with error at most two to the power
@@ -1193,25 +1327,28 @@ E(b)-@var{err} where E(b) is the exponent of
and 0 otherwise. This function @strong{does not modify} its arguments.
@end deftypefun
-@node Contributors, References, Miscellaneous Float Functions, Top
+@node Contributors, References, Floating-point Functions, Top
@comment node-name, next, previous, up
@unnumbered Contributors
We would like to thank Jean-Michel Muller and Joris van der Hoeven for very
fruitful discussions at the beginning of that project, Torbjorn Granlund
-for his help about design issues
-and his suggestions for a easy integration into GNU MP.
+and Kevin Ryde
+for their help about design issues
+and their suggestions for an easy integration into GNU MP,
+and Nathalie Revol for her careful reading of this documentation.
Sylvie Boldo from ENS-Lyon, France,
contributed the functions @code{mpfr_agm} and @code{mpfr_log}.
Emmanuel Jeandel, from ENS-Lyon too,
contributed the generic hypergeometric code in
@code{generic.c}, as well as the @code{mpfr_exp3},
-the @code{mpfr_sin_cos} functions, and improved versions of
+a first implementation of the sine and cosine,
+and improved versions of
@code{mpfr_const_log2} and @code{mpfr_const_pi}.
-
-Thom Mulders (ETH Z\"urich) contributed the routines for short
-multiplication.
+Mathieu Dutour contributed the functions @code{mpfr_atan} and @code{mpfr_asin},
+David Daney contributed the hyperbolic and inverse hyperbolic functions,
+the base-2 exponential, and the factorial function.
@node References, , Contributors, Top
@comment node-name, next, previous, up
diff --git a/mpfr/sin_cos.c b/mpfr/sin_cos.c
deleted file mode 100644
index ff1300f09..000000000
--- a/mpfr/sin_cos.c
+++ /dev/null
@@ -1,275 +0,0 @@
-/* mpfr_sin_cos -- sine and cosine of a floating-point number
-
-Copyright (C) 2000 Free Software Foundation.
-
-This file is part of the MPFR Library.
-
-The MPFR Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-The MPFR Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-License for more details.
-
-You should have received a copy of the GNU Library General Public License
-along with the MPFR Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA. */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include "gmp.h"
-#include "gmp-impl.h"
-#include "mpfr.h"
-#include "mpfr-impl.h"
-
-int mpfr_sin_aux _PROTO ((mpfr_ptr, mpz_srcptr, int, int));
-int mpfr_cos_aux _PROTO ((mpfr_ptr, mpz_srcptr, int, int));
-
-#undef A
-#undef B
-#define C
-#define C1 3
-#define C2 2
-#define GENERIC mpfr_sin_aux
-#include "generic.c"
-#undef C
-#undef C1
-#undef C2
-#undef GENERIC
-
-#undef A
-#undef B
-#define C
-#define C1 1
-#define C2 2
-#define GENERIC mpfr_cos_aux
-#include "generic.c"
-
-#define shift (BITS_PER_MP_LIMB / 2)
-
-int
-#if __STDC__
-mpfr_sin_cos (mpfr_ptr sinus, mpfr_ptr cosinus, mpfr_srcptr x, mp_rnd_t rnd_mode)
-#else
-mpfr_sin_cos (sinus, cosinus, x, rnd_mode)
- mpfr_ptr sinus;
- mpfr_ptr cosinus;
- mpfr_srcptr x;
- mp_rnd_t rnd_mode;
-#endif
-{
- mpfr_t t_sin, t_cos;
- mpfr_t x_copy;
- int i,k;
- mpz_t uk;
- mpz_t square;
- mpfr_t tmp_sin, tmp_cos;
- mpfr_t tmp;
- mpfr_t inter;
- int ttt;
- int twopoweri, expo;
- int Prec;
- int loop;
- int prec_x;
- int shift_x = 0;
- int good = 0;
- int realprec = 0, target_prec;
- int iter;
- int factor;
- int logn;
- int tmp_factor;
- int tmpi;
- TMP_DECL (marker);
-
- if (sinus == cosinus) {
- fprintf (stderr, "Error in mpfr_sin_cos: 1st and 2nd operands must be different\n");
- exit (1);
- }
-
- if (MPFR_IS_NAN(x) || MPFR_IS_INF(x)) {
- if (sinus != NULL) MPFR_SET_NAN(sinus);
- if (cosinus != NULL) MPFR_SET_NAN(cosinus);
- return 1; /* inexact */
- }
-
- if (!MPFR_NOTZERO(x)) {
- if (sinus != NULL) mpfr_set_ui (sinus, 0, GMP_RNDN);
- if (cosinus != NULL) mpfr_set_ui (cosinus, 1, GMP_RNDN);
- return 0; /* exact results */
- }
-
- TMP_MARK (marker);
- /* allow sinus or cosinus to be NULL */
- if (sinus == NULL) { mp_size_t s;
- if (cosinus == NULL) {
- fprintf (stderr, "Error in mpfr_sin_cos: 1st and 2nd operands cannot be NULL simultaneously\n");
- exit (1);
- }
- s = 1 + (MPFR_PREC(cosinus) - 1) / BITS_PER_MP_LIMB;
- sinus = TMP_ALLOC (sizeof(mpfr_t));
- MPFR_MANT(sinus) = (mp_ptr) TMP_ALLOC(s*BYTES_PER_MP_LIMB);
- MPFR_PREC(sinus) = MPFR_PREC(cosinus);
- MPFR_SIZE(sinus) = s;
- MPFR_EXP(sinus) = 0;
- }
- else if (cosinus == NULL) { mp_size_t s;
- s = 1 + (MPFR_PREC(sinus) - 1) / BITS_PER_MP_LIMB;
- cosinus = TMP_ALLOC (sizeof(mpfr_t));
- MPFR_MANT(cosinus) = (mp_ptr) TMP_ALLOC(s*BYTES_PER_MP_LIMB);
- MPFR_PREC(cosinus) = MPFR_PREC(sinus);
- MPFR_SIZE(cosinus) = s;
- MPFR_EXP(cosinus) = 0;
- }
-
- prec_x = _mpfr_ceil_log2 ((double) MPFR_PREC(x) / BITS_PER_MP_LIMB);
- ttt = MPFR_EXP(x);
- mpfr_init2(x_copy, MPFR_PREC(x));
- mpfr_set(x_copy,x,GMP_RNDD);
- mpz_init (square);
- /* on fait le shift pour que le nombre soit inferieur a 1 */
- if (ttt > 0)
- {
- shift_x = ttt;
- mpfr_mul_2exp(x_copy,x,-ttt, GMP_RNDN);
- ttt = MPFR_EXP(x_copy);
- }
- target_prec = MPFR_PREC(sinus);
- if (MPFR_PREC(cosinus) > target_prec) target_prec = MPFR_PREC(cosinus);
- logn = _mpfr_ceil_log2 ((double) target_prec);
- if (logn < 2) logn = 2;
- factor = logn;
- realprec = target_prec + logn;
- mpz_init (uk);
- while (!good) {
- Prec = realprec + 2*shift + 2 + shift_x + factor;
- k = _mpfr_ceil_log2 ((double) Prec / BITS_PER_MP_LIMB);
-
- /* now we extract */
- mpfr_init2(t_sin, Prec);
- mpfr_init2(t_cos, Prec);
- mpfr_init2(tmp, Prec);
- mpfr_init2(tmp_sin, Prec);
- mpfr_init2(tmp_cos, Prec);
- mpfr_init2(inter, Prec);
- mpfr_set_ui(tmp_sin,0,GMP_RNDN);
- mpfr_set_ui(tmp_cos,1,GMP_RNDN);
- twopoweri = BITS_PER_MP_LIMB;
- if (k <= prec_x) iter = k; else iter= prec_x;
- for(i = 0; i <= iter; i++) {
- mpfr_extract (uk, x_copy, i);
- expo = twopoweri - ttt;
- if (i)
- {
- if (twopoweri > target_prec) {
- /* truncate the last uk, i.e. bits twopoweri/2 to twopoweri */
- mpz_div_2exp (uk, uk, twopoweri - target_prec);
- expo -= twopoweri - target_prec;
- }
- mpz_mul (square, uk, uk);
- mpz_neg (square, square);
- mpfr_sin_aux (t_sin, square, 2*expo + 2, k - i + 1);
- mpfr_cos_aux (t_cos, square, 2*expo + 2, k - i + 1);
- mpfr_set_z (tmp, uk, GMP_RNDD);
- mpfr_mul (t_sin, t_sin, tmp, GMP_RNDD);
- mpfr_div_2exp (t_sin, t_sin, MIN(twopoweri, target_prec) - ttt, GMP_RNDD);
- }
- else
- {
- /* cas particulier : on est oblige de faire les calculs avec x/2^.
- puis elever au carre (plus rapide) */
- mpz_set (square, uk);
- mpz_mul (square, square, square);
- mpz_neg (square, square);
- /* pour l'instant, shift = 0 ... */
- /* ATTENTION, IL FAUT AUSSI MULTIPLIER LE DENOMINATEUR */
- mpfr_sin_aux(t_sin,square, 2*(shift + twopoweri - ttt) + 2, k+1);
- mpfr_cos_aux(t_cos,square, 2*(shift + twopoweri - ttt) + 2, k+1);
- mpfr_set_z (tmp, uk, GMP_RNDD);
- mpfr_mul(t_sin, t_sin, tmp,GMP_RNDD);
- /* LA AUSSI, IL FAUT PENSER A DECALER DE twopoweri - ttt) */
- mpfr_div_2exp(t_sin,t_sin, twopoweri - ttt + shift, GMP_RNDD);
- for (loop= 0 ; loop < shift; loop++){
- /* t_sin = sin(a)
- t_cos = cos(a) */
- /* on veut t_sin = 2 sin a cos a
- et t_cos = 2 * cos^2 - 1 */
- mpfr_mul(t_sin, t_sin, t_cos, GMP_RNDD);
- mpfr_mul_2exp(t_sin, t_sin, 1, GMP_RNDD);
-
- mpfr_mul(t_cos, t_cos, t_cos, GMP_RNDD);
- mpfr_mul_2exp(t_cos, t_cos, 1, GMP_RNDD);
- mpfr_sub_ui(t_cos, t_cos, 1, GMP_RNDD);
- }
- }
- /* on utilise cos(a+b) = cos a cos b - sin a sin b
- sin(a+b) = sin a cos b + cos a sin b */
- /* Donnees :
- tmp = cos(a)
- tmp_sin = sin(a)
- t_sin = sin(b)
- t_cos = cos(b) */
- mpfr_set(tmp, tmp_cos,GMP_RNDD);
- /* inter = sin a sin b */
- mpfr_mul(inter, tmp_sin, t_sin, GMP_RNDD);
- /* tmp_cos = cos a cos b */
- mpfr_mul(tmp_cos, tmp_cos, t_cos, GMP_RNDD);
- /* tmp_cos = cos (a+b) */
- mpfr_sub(tmp_cos, tmp_cos, inter, GMP_RNDD);
- /* inter = cos a sin b */
- mpfr_mul(inter, tmp, t_sin, GMP_RNDD);
- /* tmp_sin = sin a cos b */
- mpfr_mul(tmp_sin, tmp_sin, t_cos, GMP_RNDD);
- /* tmp_sin = sin (a+b) */
- mpfr_add(tmp_sin, tmp_sin, inter, GMP_RNDD);
- twopoweri <<= 1;
- }
- tmp_factor= factor;
- for (loop= 0 ; loop < shift_x; loop++){
- mpfr_mul(tmp_sin, tmp_sin, tmp_cos, GMP_RNDD);
- mpfr_mul_2exp(tmp_sin, tmp_sin, 1, GMP_RNDD);
- mpfr_mul(tmp_cos, tmp_cos, tmp_cos, GMP_RNDD);
- mpfr_mul_2exp(tmp_cos, tmp_cos, 1, GMP_RNDD);
- tmpi = -MPFR_EXP(tmp_cos);
- mpfr_set_ui(tmp, 1, GMP_RNDN);
- mpfr_sub(tmp_cos, tmp_cos, tmp, GMP_RNDD);
- /* rep\'erer si le nombre de chiffres obtenu est suffisant pour
- avoir la bonne pr\'ecision. Le probl\`eme : comment faire ?
- la pr\'ecision s'obtient en comparant
- (Prec-factor) a la pr\'ecision obtenue r\'eellement, celle-ci
- \'etant donn\'ee par Prec + MPFR_EXP(tmp_cos).
- il faut donc comparer MPFR_EXP(tmp_cos) a factor */
- tmp_factor -= -MPFR_EXP(tmp_cos) + tmpi;
- if (tmp_factor <= 0)
- {
- factor += -tmp_factor + 5;
- goto try_again;
- }
- }
- if (mpfr_can_round(tmp_sin, realprec, GMP_RNDD, rnd_mode, MPFR_PREC(sinus)) &&
- mpfr_can_round(tmp_cos, realprec, GMP_RNDD, rnd_mode, MPFR_PREC(cosinus))) {
- mpfr_set(sinus, tmp_sin, rnd_mode);
- mpfr_set(cosinus, tmp_cos, rnd_mode);
- good = 1;
- }
- else {
- realprec += 3*logn;
- }
- try_again:
- mpfr_clear(t_sin);
- mpfr_clear(t_cos);
- mpfr_clear(tmp);
- mpfr_clear(tmp_sin);
- mpfr_clear(tmp_cos);
- mpfr_clear(inter);
- }
- mpz_clear (uk);
- mpz_clear (square);
- mpfr_clear (x_copy);
- TMP_FREE (marker);
-
- return 1; /* inexact result */
-}
diff --git a/mpfr/tests/Makefile.am b/mpfr/tests/Makefile.am
index 5ba39f64f..4604ece56 100644
--- a/mpfr/tests/Makefile.am
+++ b/mpfr/tests/Makefile.am
@@ -25,9 +25,11 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mpfr
LDADD = ../libmpfr.a $(top_builddir)/libgmp.la $(LIBM)
if WANT_MPFR
-check_PROGRAMS= reuse tabs tadd tagm tcan_round tcmp tcmp2 tcmp_ui tdiv tdiv_ui tdump teq texp tget_str tlog tlog2 tmul tmul_2exp tmul_ui tout_str tpi tpow trandom tround tset_d tset_f tset_q tset_si tset_str tset_z tsqrt tsqrt_ui tui_div tui_sub tsin_cos tswap ttrunc
+check_PROGRAMS= reuse tabs tadd tagm tcan_round tcmp tcmp2 tcmp_ui tdiv tdiv_ui tdump teq texp tget_str tlog tlog2 tmul tmul_2exp tmul_ui tout_str tpi tpow trandom tround tset_d tset_f tset_q tset_si tset_str tset_z tsqrt tsqrt_ui tui_div tui_sub tswap ttrunc tisnan tget_d tatan tcosh tsinh ttanh tacosh tasinh tatanh thyperbolic texp2 tfactorial tsub tasin teuler tcos tsin ttan tsub_ui tset tlog1p texpm1 tlog_base_2 tui_pow tpow3 tlog_base_10 tadd_ui texceptions tfma thypot
TESTS = $(check_PROGRAMS)
endif
+EXTRA_DIST= tgeneric.c
../libmpfr.a:
cd $(top_srcdir)/mpfr; make libmpfr.a
+
diff --git a/mpfr/tests/Makefile.in b/mpfr/tests/Makefile.in
index 8a377a048..3684f8d2d 100644
--- a/mpfr/tests/Makefile.in
+++ b/mpfr/tests/Makefile.in
@@ -132,8 +132,9 @@ AUTOMAKE_OPTIONS = gnu no-dependencies
INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/mpfr
LDADD = ../libmpfr.a $(top_builddir)/libgmp.la $(LIBM)
-@WANT_MPFR_TRUE@check_PROGRAMS = reuse tabs tadd tagm tcan_round tcmp tcmp2 tcmp_ui tdiv tdiv_ui tdump teq texp tget_str tlog tlog2 tmul tmul_2exp tmul_ui tout_str tpi tpow trandom tround tset_d tset_f tset_q tset_si tset_str tset_z tsqrt tsqrt_ui tui_div tui_sub tsin_cos tswap ttrunc
+@WANT_MPFR_TRUE@check_PROGRAMS = reuse tabs tadd tagm tcan_round tcmp tcmp2 tcmp_ui tdiv tdiv_ui tdump teq texp tget_str tlog tlog2 tmul tmul_2exp tmul_ui tout_str tpi tpow trandom tround tset_d tset_f tset_q tset_si tset_str tset_z tsqrt tsqrt_ui tui_div tui_sub tswap ttrunc tisnan tget_d tatan tcosh tsinh ttanh tacosh tasinh tatanh thyperbolic texp2 tfactorial tsub tasin teuler tcos tsin ttan tsub_ui tset tlog1p texpm1 tlog_base_2 tui_pow tpow3 tlog_base_10 tadd_ui texceptions tfma thypot
@WANT_MPFR_TRUE@TESTS = $(check_PROGRAMS)
+EXTRA_DIST = tgeneric.c
subdir = mpfr/tests
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
@@ -151,8 +152,19 @@ CONFIG_CLEAN_FILES =
@WANT_MPFR_TRUE@ tset_si$(EXEEXT) tset_str$(EXEEXT) \
@WANT_MPFR_TRUE@ tset_z$(EXEEXT) tsqrt$(EXEEXT) \
@WANT_MPFR_TRUE@ tsqrt_ui$(EXEEXT) tui_div$(EXEEXT) \
-@WANT_MPFR_TRUE@ tui_sub$(EXEEXT) tsin_cos$(EXEEXT) \
-@WANT_MPFR_TRUE@ tswap$(EXEEXT) ttrunc$(EXEEXT)
+@WANT_MPFR_TRUE@ tui_sub$(EXEEXT) tswap$(EXEEXT) ttrunc$(EXEEXT) \
+@WANT_MPFR_TRUE@ tisnan$(EXEEXT) tget_d$(EXEEXT) tatan$(EXEEXT) \
+@WANT_MPFR_TRUE@ tcosh$(EXEEXT) tsinh$(EXEEXT) ttanh$(EXEEXT) \
+@WANT_MPFR_TRUE@ tacosh$(EXEEXT) tasinh$(EXEEXT) tatanh$(EXEEXT) \
+@WANT_MPFR_TRUE@ thyperbolic$(EXEEXT) texp2$(EXEEXT) \
+@WANT_MPFR_TRUE@ tfactorial$(EXEEXT) tsub$(EXEEXT) \
+@WANT_MPFR_TRUE@ tasin$(EXEEXT) teuler$(EXEEXT) tcos$(EXEEXT) \
+@WANT_MPFR_TRUE@ tsin$(EXEEXT) ttan$(EXEEXT) tsub_ui$(EXEEXT) \
+@WANT_MPFR_TRUE@ tset$(EXEEXT) tlog1p$(EXEEXT) texpm1$(EXEEXT) \
+@WANT_MPFR_TRUE@ tlog_base_2$(EXEEXT) tui_pow$(EXEEXT) \
+@WANT_MPFR_TRUE@ tpow3$(EXEEXT) tlog_base_10$(EXEEXT) \
+@WANT_MPFR_TRUE@ tadd_ui$(EXEEXT) texceptions$(EXEEXT) \
+@WANT_MPFR_TRUE@ tfma$(EXEEXT) thypot$(EXEEXT)
@WANT_MPFR_FALSE@check_PROGRAMS =
reuse_SOURCES = reuse.c
reuse_OBJECTS = reuse.$(OBJEXT)
@@ -164,16 +176,46 @@ tabs_OBJECTS = tabs.$(OBJEXT)
tabs_LDADD = $(LDADD)
tabs_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
tabs_LDFLAGS =
+tacosh_SOURCES = tacosh.c
+tacosh_OBJECTS = tacosh.$(OBJEXT)
+tacosh_LDADD = $(LDADD)
+tacosh_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tacosh_LDFLAGS =
tadd_SOURCES = tadd.c
tadd_OBJECTS = tadd.$(OBJEXT)
tadd_LDADD = $(LDADD)
tadd_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
tadd_LDFLAGS =
+tadd_ui_SOURCES = tadd_ui.c
+tadd_ui_OBJECTS = tadd_ui.$(OBJEXT)
+tadd_ui_LDADD = $(LDADD)
+tadd_ui_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tadd_ui_LDFLAGS =
tagm_SOURCES = tagm.c
tagm_OBJECTS = tagm.$(OBJEXT)
tagm_LDADD = $(LDADD)
tagm_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
tagm_LDFLAGS =
+tasin_SOURCES = tasin.c
+tasin_OBJECTS = tasin.$(OBJEXT)
+tasin_LDADD = $(LDADD)
+tasin_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tasin_LDFLAGS =
+tasinh_SOURCES = tasinh.c
+tasinh_OBJECTS = tasinh.$(OBJEXT)
+tasinh_LDADD = $(LDADD)
+tasinh_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tasinh_LDFLAGS =
+tatan_SOURCES = tatan.c
+tatan_OBJECTS = tatan.$(OBJEXT)
+tatan_LDADD = $(LDADD)
+tatan_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tatan_LDFLAGS =
+tatanh_SOURCES = tatanh.c
+tatanh_OBJECTS = tatanh.$(OBJEXT)
+tatanh_LDADD = $(LDADD)
+tatanh_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tatanh_LDFLAGS =
tcan_round_SOURCES = tcan_round.c
tcan_round_OBJECTS = tcan_round.$(OBJEXT)
tcan_round_LDADD = $(LDADD)
@@ -194,6 +236,16 @@ tcmp_ui_OBJECTS = tcmp_ui.$(OBJEXT)
tcmp_ui_LDADD = $(LDADD)
tcmp_ui_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
tcmp_ui_LDFLAGS =
+tcos_SOURCES = tcos.c
+tcos_OBJECTS = tcos.$(OBJEXT)
+tcos_LDADD = $(LDADD)
+tcos_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tcos_LDFLAGS =
+tcosh_SOURCES = tcosh.c
+tcosh_OBJECTS = tcosh.$(OBJEXT)
+tcosh_LDADD = $(LDADD)
+tcosh_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tcosh_LDFLAGS =
tdiv_SOURCES = tdiv.c
tdiv_OBJECTS = tdiv.$(OBJEXT)
tdiv_LDADD = $(LDADD)
@@ -214,26 +266,91 @@ teq_OBJECTS = teq.$(OBJEXT)
teq_LDADD = $(LDADD)
teq_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
teq_LDFLAGS =
+teuler_SOURCES = teuler.c
+teuler_OBJECTS = teuler.$(OBJEXT)
+teuler_LDADD = $(LDADD)
+teuler_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+teuler_LDFLAGS =
+texceptions_SOURCES = texceptions.c
+texceptions_OBJECTS = texceptions.$(OBJEXT)
+texceptions_LDADD = $(LDADD)
+texceptions_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+texceptions_LDFLAGS =
texp_SOURCES = texp.c
texp_OBJECTS = texp.$(OBJEXT)
texp_LDADD = $(LDADD)
texp_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
texp_LDFLAGS =
+texp2_SOURCES = texp2.c
+texp2_OBJECTS = texp2.$(OBJEXT)
+texp2_LDADD = $(LDADD)
+texp2_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+texp2_LDFLAGS =
+texpm1_SOURCES = texpm1.c
+texpm1_OBJECTS = texpm1.$(OBJEXT)
+texpm1_LDADD = $(LDADD)
+texpm1_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+texpm1_LDFLAGS =
+tfactorial_SOURCES = tfactorial.c
+tfactorial_OBJECTS = tfactorial.$(OBJEXT)
+tfactorial_LDADD = $(LDADD)
+tfactorial_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tfactorial_LDFLAGS =
+tfma_SOURCES = tfma.c
+tfma_OBJECTS = tfma.$(OBJEXT)
+tfma_LDADD = $(LDADD)
+tfma_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tfma_LDFLAGS =
+tget_d_SOURCES = tget_d.c
+tget_d_OBJECTS = tget_d.$(OBJEXT)
+tget_d_LDADD = $(LDADD)
+tget_d_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tget_d_LDFLAGS =
tget_str_SOURCES = tget_str.c
tget_str_OBJECTS = tget_str.$(OBJEXT)
tget_str_LDADD = $(LDADD)
tget_str_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
tget_str_LDFLAGS =
+thyperbolic_SOURCES = thyperbolic.c
+thyperbolic_OBJECTS = thyperbolic.$(OBJEXT)
+thyperbolic_LDADD = $(LDADD)
+thyperbolic_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+thyperbolic_LDFLAGS =
+thypot_SOURCES = thypot.c
+thypot_OBJECTS = thypot.$(OBJEXT)
+thypot_LDADD = $(LDADD)
+thypot_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+thypot_LDFLAGS =
+tisnan_SOURCES = tisnan.c
+tisnan_OBJECTS = tisnan.$(OBJEXT)
+tisnan_LDADD = $(LDADD)
+tisnan_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tisnan_LDFLAGS =
tlog_SOURCES = tlog.c
tlog_OBJECTS = tlog.$(OBJEXT)
tlog_LDADD = $(LDADD)
tlog_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
tlog_LDFLAGS =
+tlog1p_SOURCES = tlog1p.c
+tlog1p_OBJECTS = tlog1p.$(OBJEXT)
+tlog1p_LDADD = $(LDADD)
+tlog1p_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tlog1p_LDFLAGS =
tlog2_SOURCES = tlog2.c
tlog2_OBJECTS = tlog2.$(OBJEXT)
tlog2_LDADD = $(LDADD)
tlog2_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
tlog2_LDFLAGS =
+tlog_base_10_SOURCES = tlog_base_10.c
+tlog_base_10_OBJECTS = tlog_base_10.$(OBJEXT)
+tlog_base_10_LDADD = $(LDADD)
+tlog_base_10_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tlog_base_10_LDFLAGS =
+tlog_base_2_SOURCES = tlog_base_2.c
+tlog_base_2_OBJECTS = tlog_base_2.$(OBJEXT)
+tlog_base_2_LDADD = $(LDADD)
+tlog_base_2_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tlog_base_2_LDFLAGS =
tmul_SOURCES = tmul.c
tmul_OBJECTS = tmul.$(OBJEXT)
tmul_LDADD = $(LDADD)
@@ -264,6 +381,11 @@ tpow_OBJECTS = tpow.$(OBJEXT)
tpow_LDADD = $(LDADD)
tpow_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
tpow_LDFLAGS =
+tpow3_SOURCES = tpow3.c
+tpow3_OBJECTS = tpow3.$(OBJEXT)
+tpow3_LDADD = $(LDADD)
+tpow3_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tpow3_LDFLAGS =
trandom_SOURCES = trandom.c
trandom_OBJECTS = trandom.$(OBJEXT)
trandom_LDADD = $(LDADD)
@@ -274,6 +396,11 @@ tround_OBJECTS = tround.$(OBJEXT)
tround_LDADD = $(LDADD)
tround_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
tround_LDFLAGS =
+tset_SOURCES = tset.c
+tset_OBJECTS = tset.$(OBJEXT)
+tset_LDADD = $(LDADD)
+tset_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tset_LDFLAGS =
tset_d_SOURCES = tset_d.c
tset_d_OBJECTS = tset_d.$(OBJEXT)
tset_d_LDADD = $(LDADD)
@@ -304,11 +431,16 @@ tset_z_OBJECTS = tset_z.$(OBJEXT)
tset_z_LDADD = $(LDADD)
tset_z_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
tset_z_LDFLAGS =
-tsin_cos_SOURCES = tsin_cos.c
-tsin_cos_OBJECTS = tsin_cos.$(OBJEXT)
-tsin_cos_LDADD = $(LDADD)
-tsin_cos_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
-tsin_cos_LDFLAGS =
+tsin_SOURCES = tsin.c
+tsin_OBJECTS = tsin.$(OBJEXT)
+tsin_LDADD = $(LDADD)
+tsin_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tsin_LDFLAGS =
+tsinh_SOURCES = tsinh.c
+tsinh_OBJECTS = tsinh.$(OBJEXT)
+tsinh_LDADD = $(LDADD)
+tsinh_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tsinh_LDFLAGS =
tsqrt_SOURCES = tsqrt.c
tsqrt_OBJECTS = tsqrt.$(OBJEXT)
tsqrt_LDADD = $(LDADD)
@@ -319,11 +451,31 @@ tsqrt_ui_OBJECTS = tsqrt_ui.$(OBJEXT)
tsqrt_ui_LDADD = $(LDADD)
tsqrt_ui_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
tsqrt_ui_LDFLAGS =
+tsub_SOURCES = tsub.c
+tsub_OBJECTS = tsub.$(OBJEXT)
+tsub_LDADD = $(LDADD)
+tsub_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tsub_LDFLAGS =
+tsub_ui_SOURCES = tsub_ui.c
+tsub_ui_OBJECTS = tsub_ui.$(OBJEXT)
+tsub_ui_LDADD = $(LDADD)
+tsub_ui_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tsub_ui_LDFLAGS =
tswap_SOURCES = tswap.c
tswap_OBJECTS = tswap.$(OBJEXT)
tswap_LDADD = $(LDADD)
tswap_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
tswap_LDFLAGS =
+ttan_SOURCES = ttan.c
+ttan_OBJECTS = ttan.$(OBJEXT)
+ttan_LDADD = $(LDADD)
+ttan_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+ttan_LDFLAGS =
+ttanh_SOURCES = ttanh.c
+ttanh_OBJECTS = ttanh.$(OBJEXT)
+ttanh_LDADD = $(LDADD)
+ttanh_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+ttanh_LDFLAGS =
ttrunc_SOURCES = ttrunc.c
ttrunc_OBJECTS = ttrunc.$(OBJEXT)
ttrunc_LDADD = $(LDADD)
@@ -334,6 +486,11 @@ tui_div_OBJECTS = tui_div.$(OBJEXT)
tui_div_LDADD = $(LDADD)
tui_div_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
tui_div_LDFLAGS =
+tui_pow_SOURCES = tui_pow.c
+tui_pow_OBJECTS = tui_pow.$(OBJEXT)
+tui_pow_LDADD = $(LDADD)
+tui_pow_DEPENDENCIES = ../libmpfr.a $(top_builddir)/libgmp.la
+tui_pow_LDFLAGS =
tui_sub_SOURCES = tui_sub.c
tui_sub_OBJECTS = tui_sub.$(OBJEXT)
tui_sub_LDADD = $(LDADD)
@@ -354,14 +511,18 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
CFLAGS = @CFLAGS@
-DIST_SOURCES = reuse.c tabs.c tadd.c tagm.c tcan_round.c tcmp.c tcmp2.c \
- tcmp_ui.c tdiv.c tdiv_ui.c tdump.c teq.c texp.c tget_str.c \
- tlog.c tlog2.c tmul.c tmul_2exp.c tmul_ui.c tout_str.c tpi.c \
- tpow.c trandom.c tround.c tset_d.c tset_f.c tset_q.c tset_si.c \
- tset_str.c tset_z.c tsin_cos.c tsqrt.c tsqrt_ui.c tswap.c \
- ttrunc.c tui_div.c tui_sub.c
+DIST_SOURCES = reuse.c tabs.c tacosh.c tadd.c tadd_ui.c tagm.c tasin.c \
+ tasinh.c tatan.c tatanh.c tcan_round.c tcmp.c tcmp2.c tcmp_ui.c \
+ tcos.c tcosh.c tdiv.c tdiv_ui.c tdump.c teq.c teuler.c \
+ texceptions.c texp.c texp2.c texpm1.c tfactorial.c tfma.c \
+ tget_d.c tget_str.c thyperbolic.c thypot.c tisnan.c tlog.c \
+ tlog1p.c tlog2.c tlog_base_10.c tlog_base_2.c tmul.c \
+ tmul_2exp.c tmul_ui.c tout_str.c tpi.c tpow.c tpow3.c trandom.c \
+ tround.c tset.c tset_d.c tset_f.c tset_q.c tset_si.c tset_str.c \
+ tset_z.c tsin.c tsinh.c tsqrt.c tsqrt_ui.c tsub.c tsub_ui.c \
+ tswap.c ttan.c ttanh.c ttrunc.c tui_div.c tui_pow.c tui_sub.c
DIST_COMMON = Makefile.am Makefile.in
-SOURCES = reuse.c tabs.c tadd.c tagm.c tcan_round.c tcmp.c tcmp2.c tcmp_ui.c tdiv.c tdiv_ui.c tdump.c teq.c texp.c tget_str.c tlog.c tlog2.c tmul.c tmul_2exp.c tmul_ui.c tout_str.c tpi.c tpow.c trandom.c tround.c tset_d.c tset_f.c tset_q.c tset_si.c tset_str.c tset_z.c tsin_cos.c tsqrt.c tsqrt_ui.c tswap.c ttrunc.c tui_div.c tui_sub.c
+SOURCES = reuse.c tabs.c tacosh.c tadd.c tadd_ui.c tagm.c tasin.c tasinh.c tatan.c tatanh.c tcan_round.c tcmp.c tcmp2.c tcmp_ui.c tcos.c tcosh.c tdiv.c tdiv_ui.c tdump.c teq.c teuler.c texceptions.c texp.c texp2.c texpm1.c tfactorial.c tfma.c tget_d.c tget_str.c thyperbolic.c thypot.c tisnan.c tlog.c tlog1p.c tlog2.c tlog_base_10.c tlog_base_2.c tmul.c tmul_2exp.c tmul_ui.c tout_str.c tpi.c tpow.c tpow3.c trandom.c tround.c tset.c tset_d.c tset_f.c tset_q.c tset_si.c tset_str.c tset_z.c tsin.c tsinh.c tsqrt.c tsqrt_ui.c tsub.c tsub_ui.c tswap.c ttan.c ttanh.c ttrunc.c tui_div.c tui_pow.c tui_sub.c
all: all-am
@@ -392,12 +553,30 @@ reuse$(EXEEXT): $(reuse_OBJECTS) $(reuse_DEPENDENCIES)
tabs$(EXEEXT): $(tabs_OBJECTS) $(tabs_DEPENDENCIES)
@rm -f tabs$(EXEEXT)
$(LINK) $(tabs_LDFLAGS) $(tabs_OBJECTS) $(tabs_LDADD) $(LIBS)
+tacosh$(EXEEXT): $(tacosh_OBJECTS) $(tacosh_DEPENDENCIES)
+ @rm -f tacosh$(EXEEXT)
+ $(LINK) $(tacosh_LDFLAGS) $(tacosh_OBJECTS) $(tacosh_LDADD) $(LIBS)
tadd$(EXEEXT): $(tadd_OBJECTS) $(tadd_DEPENDENCIES)
@rm -f tadd$(EXEEXT)
$(LINK) $(tadd_LDFLAGS) $(tadd_OBJECTS) $(tadd_LDADD) $(LIBS)
+tadd_ui$(EXEEXT): $(tadd_ui_OBJECTS) $(tadd_ui_DEPENDENCIES)
+ @rm -f tadd_ui$(EXEEXT)
+ $(LINK) $(tadd_ui_LDFLAGS) $(tadd_ui_OBJECTS) $(tadd_ui_LDADD) $(LIBS)
tagm$(EXEEXT): $(tagm_OBJECTS) $(tagm_DEPENDENCIES)
@rm -f tagm$(EXEEXT)
$(LINK) $(tagm_LDFLAGS) $(tagm_OBJECTS) $(tagm_LDADD) $(LIBS)
+tasin$(EXEEXT): $(tasin_OBJECTS) $(tasin_DEPENDENCIES)
+ @rm -f tasin$(EXEEXT)
+ $(LINK) $(tasin_LDFLAGS) $(tasin_OBJECTS) $(tasin_LDADD) $(LIBS)
+tasinh$(EXEEXT): $(tasinh_OBJECTS) $(tasinh_DEPENDENCIES)
+ @rm -f tasinh$(EXEEXT)
+ $(LINK) $(tasinh_LDFLAGS) $(tasinh_OBJECTS) $(tasinh_LDADD) $(LIBS)
+tatan$(EXEEXT): $(tatan_OBJECTS) $(tatan_DEPENDENCIES)
+ @rm -f tatan$(EXEEXT)
+ $(LINK) $(tatan_LDFLAGS) $(tatan_OBJECTS) $(tatan_LDADD) $(LIBS)
+tatanh$(EXEEXT): $(tatanh_OBJECTS) $(tatanh_DEPENDENCIES)
+ @rm -f tatanh$(EXEEXT)
+ $(LINK) $(tatanh_LDFLAGS) $(tatanh_OBJECTS) $(tatanh_LDADD) $(LIBS)
tcan_round$(EXEEXT): $(tcan_round_OBJECTS) $(tcan_round_DEPENDENCIES)
@rm -f tcan_round$(EXEEXT)
$(LINK) $(tcan_round_LDFLAGS) $(tcan_round_OBJECTS) $(tcan_round_LDADD) $(LIBS)
@@ -410,6 +589,12 @@ tcmp2$(EXEEXT): $(tcmp2_OBJECTS) $(tcmp2_DEPENDENCIES)
tcmp_ui$(EXEEXT): $(tcmp_ui_OBJECTS) $(tcmp_ui_DEPENDENCIES)
@rm -f tcmp_ui$(EXEEXT)
$(LINK) $(tcmp_ui_LDFLAGS) $(tcmp_ui_OBJECTS) $(tcmp_ui_LDADD) $(LIBS)
+tcos$(EXEEXT): $(tcos_OBJECTS) $(tcos_DEPENDENCIES)
+ @rm -f tcos$(EXEEXT)
+ $(LINK) $(tcos_LDFLAGS) $(tcos_OBJECTS) $(tcos_LDADD) $(LIBS)
+tcosh$(EXEEXT): $(tcosh_OBJECTS) $(tcosh_DEPENDENCIES)
+ @rm -f tcosh$(EXEEXT)
+ $(LINK) $(tcosh_LDFLAGS) $(tcosh_OBJECTS) $(tcosh_LDADD) $(LIBS)
tdiv$(EXEEXT): $(tdiv_OBJECTS) $(tdiv_DEPENDENCIES)
@rm -f tdiv$(EXEEXT)
$(LINK) $(tdiv_LDFLAGS) $(tdiv_OBJECTS) $(tdiv_LDADD) $(LIBS)
@@ -422,18 +607,57 @@ tdump$(EXEEXT): $(tdump_OBJECTS) $(tdump_DEPENDENCIES)
teq$(EXEEXT): $(teq_OBJECTS) $(teq_DEPENDENCIES)
@rm -f teq$(EXEEXT)
$(LINK) $(teq_LDFLAGS) $(teq_OBJECTS) $(teq_LDADD) $(LIBS)
+teuler$(EXEEXT): $(teuler_OBJECTS) $(teuler_DEPENDENCIES)
+ @rm -f teuler$(EXEEXT)
+ $(LINK) $(teuler_LDFLAGS) $(teuler_OBJECTS) $(teuler_LDADD) $(LIBS)
+texceptions$(EXEEXT): $(texceptions_OBJECTS) $(texceptions_DEPENDENCIES)
+ @rm -f texceptions$(EXEEXT)
+ $(LINK) $(texceptions_LDFLAGS) $(texceptions_OBJECTS) $(texceptions_LDADD) $(LIBS)
texp$(EXEEXT): $(texp_OBJECTS) $(texp_DEPENDENCIES)
@rm -f texp$(EXEEXT)
$(LINK) $(texp_LDFLAGS) $(texp_OBJECTS) $(texp_LDADD) $(LIBS)
+texp2$(EXEEXT): $(texp2_OBJECTS) $(texp2_DEPENDENCIES)
+ @rm -f texp2$(EXEEXT)
+ $(LINK) $(texp2_LDFLAGS) $(texp2_OBJECTS) $(texp2_LDADD) $(LIBS)
+texpm1$(EXEEXT): $(texpm1_OBJECTS) $(texpm1_DEPENDENCIES)
+ @rm -f texpm1$(EXEEXT)
+ $(LINK) $(texpm1_LDFLAGS) $(texpm1_OBJECTS) $(texpm1_LDADD) $(LIBS)
+tfactorial$(EXEEXT): $(tfactorial_OBJECTS) $(tfactorial_DEPENDENCIES)
+ @rm -f tfactorial$(EXEEXT)
+ $(LINK) $(tfactorial_LDFLAGS) $(tfactorial_OBJECTS) $(tfactorial_LDADD) $(LIBS)
+tfma$(EXEEXT): $(tfma_OBJECTS) $(tfma_DEPENDENCIES)
+ @rm -f tfma$(EXEEXT)
+ $(LINK) $(tfma_LDFLAGS) $(tfma_OBJECTS) $(tfma_LDADD) $(LIBS)
+tget_d$(EXEEXT): $(tget_d_OBJECTS) $(tget_d_DEPENDENCIES)
+ @rm -f tget_d$(EXEEXT)
+ $(LINK) $(tget_d_LDFLAGS) $(tget_d_OBJECTS) $(tget_d_LDADD) $(LIBS)
tget_str$(EXEEXT): $(tget_str_OBJECTS) $(tget_str_DEPENDENCIES)
@rm -f tget_str$(EXEEXT)
$(LINK) $(tget_str_LDFLAGS) $(tget_str_OBJECTS) $(tget_str_LDADD) $(LIBS)
+thyperbolic$(EXEEXT): $(thyperbolic_OBJECTS) $(thyperbolic_DEPENDENCIES)
+ @rm -f thyperbolic$(EXEEXT)
+ $(LINK) $(thyperbolic_LDFLAGS) $(thyperbolic_OBJECTS) $(thyperbolic_LDADD) $(LIBS)
+thypot$(EXEEXT): $(thypot_OBJECTS) $(thypot_DEPENDENCIES)
+ @rm -f thypot$(EXEEXT)
+ $(LINK) $(thypot_LDFLAGS) $(thypot_OBJECTS) $(thypot_LDADD) $(LIBS)
+tisnan$(EXEEXT): $(tisnan_OBJECTS) $(tisnan_DEPENDENCIES)
+ @rm -f tisnan$(EXEEXT)
+ $(LINK) $(tisnan_LDFLAGS) $(tisnan_OBJECTS) $(tisnan_LDADD) $(LIBS)
tlog$(EXEEXT): $(tlog_OBJECTS) $(tlog_DEPENDENCIES)
@rm -f tlog$(EXEEXT)
$(LINK) $(tlog_LDFLAGS) $(tlog_OBJECTS) $(tlog_LDADD) $(LIBS)
+tlog1p$(EXEEXT): $(tlog1p_OBJECTS) $(tlog1p_DEPENDENCIES)
+ @rm -f tlog1p$(EXEEXT)
+ $(LINK) $(tlog1p_LDFLAGS) $(tlog1p_OBJECTS) $(tlog1p_LDADD) $(LIBS)
tlog2$(EXEEXT): $(tlog2_OBJECTS) $(tlog2_DEPENDENCIES)
@rm -f tlog2$(EXEEXT)
$(LINK) $(tlog2_LDFLAGS) $(tlog2_OBJECTS) $(tlog2_LDADD) $(LIBS)
+tlog_base_10$(EXEEXT): $(tlog_base_10_OBJECTS) $(tlog_base_10_DEPENDENCIES)
+ @rm -f tlog_base_10$(EXEEXT)
+ $(LINK) $(tlog_base_10_LDFLAGS) $(tlog_base_10_OBJECTS) $(tlog_base_10_LDADD) $(LIBS)
+tlog_base_2$(EXEEXT): $(tlog_base_2_OBJECTS) $(tlog_base_2_DEPENDENCIES)
+ @rm -f tlog_base_2$(EXEEXT)
+ $(LINK) $(tlog_base_2_LDFLAGS) $(tlog_base_2_OBJECTS) $(tlog_base_2_LDADD) $(LIBS)
tmul$(EXEEXT): $(tmul_OBJECTS) $(tmul_DEPENDENCIES)
@rm -f tmul$(EXEEXT)
$(LINK) $(tmul_LDFLAGS) $(tmul_OBJECTS) $(tmul_LDADD) $(LIBS)
@@ -452,12 +676,18 @@ tpi$(EXEEXT): $(tpi_OBJECTS) $(tpi_DEPENDENCIES)
tpow$(EXEEXT): $(tpow_OBJECTS) $(tpow_DEPENDENCIES)
@rm -f tpow$(EXEEXT)
$(LINK) $(tpow_LDFLAGS) $(tpow_OBJECTS) $(tpow_LDADD) $(LIBS)
+tpow3$(EXEEXT): $(tpow3_OBJECTS) $(tpow3_DEPENDENCIES)
+ @rm -f tpow3$(EXEEXT)
+ $(LINK) $(tpow3_LDFLAGS) $(tpow3_OBJECTS) $(tpow3_LDADD) $(LIBS)
trandom$(EXEEXT): $(trandom_OBJECTS) $(trandom_DEPENDENCIES)
@rm -f trandom$(EXEEXT)
$(LINK) $(trandom_LDFLAGS) $(trandom_OBJECTS) $(trandom_LDADD) $(LIBS)
tround$(EXEEXT): $(tround_OBJECTS) $(tround_DEPENDENCIES)
@rm -f tround$(EXEEXT)
$(LINK) $(tround_LDFLAGS) $(tround_OBJECTS) $(tround_LDADD) $(LIBS)
+tset$(EXEEXT): $(tset_OBJECTS) $(tset_DEPENDENCIES)
+ @rm -f tset$(EXEEXT)
+ $(LINK) $(tset_LDFLAGS) $(tset_OBJECTS) $(tset_LDADD) $(LIBS)
tset_d$(EXEEXT): $(tset_d_OBJECTS) $(tset_d_DEPENDENCIES)
@rm -f tset_d$(EXEEXT)
$(LINK) $(tset_d_LDFLAGS) $(tset_d_OBJECTS) $(tset_d_LDADD) $(LIBS)
@@ -476,24 +706,42 @@ tset_str$(EXEEXT): $(tset_str_OBJECTS) $(tset_str_DEPENDENCIES)
tset_z$(EXEEXT): $(tset_z_OBJECTS) $(tset_z_DEPENDENCIES)
@rm -f tset_z$(EXEEXT)
$(LINK) $(tset_z_LDFLAGS) $(tset_z_OBJECTS) $(tset_z_LDADD) $(LIBS)
-tsin_cos$(EXEEXT): $(tsin_cos_OBJECTS) $(tsin_cos_DEPENDENCIES)
- @rm -f tsin_cos$(EXEEXT)
- $(LINK) $(tsin_cos_LDFLAGS) $(tsin_cos_OBJECTS) $(tsin_cos_LDADD) $(LIBS)
+tsin$(EXEEXT): $(tsin_OBJECTS) $(tsin_DEPENDENCIES)
+ @rm -f tsin$(EXEEXT)
+ $(LINK) $(tsin_LDFLAGS) $(tsin_OBJECTS) $(tsin_LDADD) $(LIBS)
+tsinh$(EXEEXT): $(tsinh_OBJECTS) $(tsinh_DEPENDENCIES)
+ @rm -f tsinh$(EXEEXT)
+ $(LINK) $(tsinh_LDFLAGS) $(tsinh_OBJECTS) $(tsinh_LDADD) $(LIBS)
tsqrt$(EXEEXT): $(tsqrt_OBJECTS) $(tsqrt_DEPENDENCIES)
@rm -f tsqrt$(EXEEXT)
$(LINK) $(tsqrt_LDFLAGS) $(tsqrt_OBJECTS) $(tsqrt_LDADD) $(LIBS)
tsqrt_ui$(EXEEXT): $(tsqrt_ui_OBJECTS) $(tsqrt_ui_DEPENDENCIES)
@rm -f tsqrt_ui$(EXEEXT)
$(LINK) $(tsqrt_ui_LDFLAGS) $(tsqrt_ui_OBJECTS) $(tsqrt_ui_LDADD) $(LIBS)
+tsub$(EXEEXT): $(tsub_OBJECTS) $(tsub_DEPENDENCIES)
+ @rm -f tsub$(EXEEXT)
+ $(LINK) $(tsub_LDFLAGS) $(tsub_OBJECTS) $(tsub_LDADD) $(LIBS)
+tsub_ui$(EXEEXT): $(tsub_ui_OBJECTS) $(tsub_ui_DEPENDENCIES)
+ @rm -f tsub_ui$(EXEEXT)
+ $(LINK) $(tsub_ui_LDFLAGS) $(tsub_ui_OBJECTS) $(tsub_ui_LDADD) $(LIBS)
tswap$(EXEEXT): $(tswap_OBJECTS) $(tswap_DEPENDENCIES)
@rm -f tswap$(EXEEXT)
$(LINK) $(tswap_LDFLAGS) $(tswap_OBJECTS) $(tswap_LDADD) $(LIBS)
+ttan$(EXEEXT): $(ttan_OBJECTS) $(ttan_DEPENDENCIES)
+ @rm -f ttan$(EXEEXT)
+ $(LINK) $(ttan_LDFLAGS) $(ttan_OBJECTS) $(ttan_LDADD) $(LIBS)
+ttanh$(EXEEXT): $(ttanh_OBJECTS) $(ttanh_DEPENDENCIES)
+ @rm -f ttanh$(EXEEXT)
+ $(LINK) $(ttanh_LDFLAGS) $(ttanh_OBJECTS) $(ttanh_LDADD) $(LIBS)
ttrunc$(EXEEXT): $(ttrunc_OBJECTS) $(ttrunc_DEPENDENCIES)
@rm -f ttrunc$(EXEEXT)
$(LINK) $(ttrunc_LDFLAGS) $(ttrunc_OBJECTS) $(ttrunc_LDADD) $(LIBS)
tui_div$(EXEEXT): $(tui_div_OBJECTS) $(tui_div_DEPENDENCIES)
@rm -f tui_div$(EXEEXT)
$(LINK) $(tui_div_LDFLAGS) $(tui_div_OBJECTS) $(tui_div_LDADD) $(LIBS)
+tui_pow$(EXEEXT): $(tui_pow_OBJECTS) $(tui_pow_DEPENDENCIES)
+ @rm -f tui_pow$(EXEEXT)
+ $(LINK) $(tui_pow_LDFLAGS) $(tui_pow_OBJECTS) $(tui_pow_LDADD) $(LIBS)
tui_sub$(EXEEXT): $(tui_sub_OBJECTS) $(tui_sub_DEPENDENCIES)
@rm -f tui_sub$(EXEEXT)
$(LINK) $(tui_sub_LDFLAGS) $(tui_sub_OBJECTS) $(tui_sub_LDADD) $(LIBS)
diff --git a/mpfr/tests/tsin_cos.c b/mpfr/tests/tsin_cos.c
deleted file mode 100644
index 01c7c395f..000000000
--- a/mpfr/tests/tsin_cos.c
+++ /dev/null
@@ -1,146 +0,0 @@
-/* Test file for mpfr_sin_cos.
-
-Copyright (C) 2000 Free Software Foundation, Inc.
-
-This file is part of the MPFR Library.
-
-The MPFR Library is free software; you can redistribute it and/or modify
-it under the terms of the GNU Library General Public License as published by
-the Free Software Foundation; either version 2 of the License, or (at your
-option) any later version.
-
-The MPFR Library is distributed in the hope that it will be useful, but
-WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
-or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
-License for more details.
-
-You should have received a copy of the GNU Library General Public License
-along with the MPFR Library; see the file COPYING.LIB. If not, write to
-the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-MA 02111-1307, USA. */
-
-#include "gmp.h"
-#include "mpfr.h"
-
-void large_test _PROTO ((int, int));
-void check53 _PROTO ((double, double, double, mp_rnd_t));
-void check53sin _PROTO ((double, double, mp_rnd_t));
-void check53cos _PROTO ((double, double, mp_rnd_t));
-
-void large_test (int prec, int N)
-{
- int i;
- mpfr_t x, s, c;
-
- mpfr_init2 (x, prec);
- mpfr_init2 (s, prec);
- mpfr_init2 (c, prec);
- mpfr_set_d (x, 3.0, GMP_RNDN);
- mpfr_sqrt (x, x, GMP_RNDN);
- for (i=0; i<N; i++) mpfr_sin_cos (s, c, x, GMP_RNDN);
- mpfr_out_str (stdout, 10, 0, s, GMP_RNDN); putchar('\n');
- mpfr_clear (x);
- mpfr_clear (s);
- mpfr_clear (c);
-}
-
-void check53 (double x, double sin_x, double cos_x, mp_rnd_t rnd_mode)
-{
- mpfr_t xx, s, c;
-
- mpfr_init2 (xx, 53);
- mpfr_init2 (s, 53);
- mpfr_init2 (c, 53);
- mpfr_set_d (xx, x, rnd_mode); /* should be exact */
- mpfr_sin_cos (s, c, xx, rnd_mode);
- if (mpfr_get_d (s) != sin_x && (!isnan(sin_x) || !isnan(mpfr_get_d(s)))) {
- fprintf (stderr, "mpfr_sin_cos failed for x=%1.20e, rnd=%s\n", x,
- mpfr_print_rnd_mode (rnd_mode));
- fprintf (stderr, "mpfr_sin_cos gives sin(x)=%1.20e, expected %1.20e\n",
- mpfr_get_d (s), sin_x);
- exit(1);
- }
- if (mpfr_get_d (c) != cos_x && (!isnan(cos_x) || !isnan(mpfr_get_d(c)))) {
- fprintf (stderr, "mpfr_sin_cos failed for x=%1.20e, rnd=%s\n", x,
- mpfr_print_rnd_mode (rnd_mode));
- fprintf (stderr, "mpfr_sin_cos gives cos(x)=%1.20e, expected %1.20e\n",
- mpfr_get_d (c), cos_x);
- exit(1);
- }
- mpfr_clear (xx);
- mpfr_clear (s);
- mpfr_clear (c);
-}
-
-void check53sin (double x, double sin_x, mp_rnd_t rnd_mode)
-{
- mpfr_t xx, s;
-
- mpfr_init2 (xx, 53);
- mpfr_init2 (s, 53);
- mpfr_set_d (xx, x, rnd_mode); /* should be exact */
- mpfr_sin_cos (s, NULL, xx, rnd_mode);
- if (mpfr_get_d (s) != sin_x && (!isnan(sin_x) || !isnan(mpfr_get_d(s)))) {
- fprintf (stderr, "mpfr_sin_cos failed for x=%1.20e, rnd=%s\n", x,
- mpfr_print_rnd_mode (rnd_mode));
- fprintf (stderr, "mpfr_sin_cos gives sin(x)=%1.20e, expected %1.20e\n",
- mpfr_get_d (s), sin_x);
- exit(1);
- }
- mpfr_clear (xx);
- mpfr_clear (s);
-}
-
-void check53cos (double x, double cos_x, mp_rnd_t rnd_mode)
-{
- mpfr_t xx, c;
-
- mpfr_init2 (xx, 53);
- mpfr_init2 (c, 53);
- mpfr_set_d (xx, x, rnd_mode); /* should be exact */
- mpfr_sin_cos (NULL, c, xx, rnd_mode);
- if (mpfr_get_d (c) != cos_x && (!isnan(cos_x) || !isnan(mpfr_get_d(c)))) {
- fprintf (stderr, "mpfr_sin_cos failed for x=%1.20e, rnd=%s\n", x,
- mpfr_print_rnd_mode (rnd_mode));
- fprintf (stderr, "mpfr_sin_cos gives cos(x)=%1.20e, expected %1.20e\n",
- mpfr_get_d (c), cos_x);
- exit(1);
- }
- mpfr_clear (xx);
- mpfr_clear (c);
-}
-
-/* tsin_cos prec [N] performs N tests with prec bits */
-int main(int argc, char *argv[])
-{
- if (argc > 1) {
- large_test (atoi (argv[1]), (argc > 2) ? atoi (argv[2]) : 1);
- }
-
- check53(0.0/0.0, 0.0/0.0, 0.0/0.0, GMP_RNDN);
- check53(1.0/0.0, 0.0/0.0, 0.0/0.0, GMP_RNDN);
- check53(-1.0/0.0, 0.0/0.0, 0.0/0.0, GMP_RNDN);
- /* worst case from PhD thesis of Vincent Lefe`vre: x=8980155785351021/2^54 */
- check53 (4.984987858808754279e-1, 4.781075595393330379e-1,
- 8.783012931285841817e-1, GMP_RNDN);
- check53 (4.984987858808754279e-1, 4.781075595393329824e-1,
- 8.783012931285840707e-1, GMP_RNDD);
- check53 (4.984987858808754279e-1, 4.781075595393329824e-1,
- 8.783012931285840707e-1, GMP_RNDZ);
- check53 (4.984987858808754279e-1, 4.781075595393330379e-1,
- 8.783012931285841817e-1, GMP_RNDU);
- check53 (1.00031274099908640274, 8.416399183372403892e-1,
- 0.540039116973283217504, GMP_RNDN);
- check53 (1.00229256850978698523, 8.427074524447979442e-1,
- 0.538371757797526551137, GMP_RNDZ);
- check53 (1.00288304857059840103, 8.430252033025980029e-1,
- 0.537874062022526966409, GMP_RNDZ);
- check53 (1.00591265847407274059, 8.446508805292128885e-1,
- 0.53531755997839769456, GMP_RNDN);
-
- /* check with one argument NULL */
- check53sin (1.00591265847407274059, 8.446508805292128885e-1, GMP_RNDN);
- check53cos (1.00591265847407274059, 0.53531755997839769456, GMP_RNDN);
-
- return 0;
-}