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 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 combine 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) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) 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. d) 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. e) 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 materials to be 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 signed it. However, nothing else grants you permission to modify or distribute the Library 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 all its terms and conditions for copying, distributing or modifying the Library 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 restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. 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 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. 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 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 system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot 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 Lesser 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. 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. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries 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). 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. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA Also add information on how to contact you by electronic and paper mail. 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 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. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! ************* * wishlist ************* Calc Enhancement Wish List: Send calc comments, suggestions, bug fixes, enhancements and interesting calc scripts that you would like you see included in future distributions to: calc-contrib at asthe dot com The following items are in the calc wish list. Programs like this can be extended and improved forever. Calc bug reports, however, should be sent to: calc-bugs at asthe dot com [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]] [[ NOTE: The EMail address uses 'asthe' and the web site URL uses 'isthe' ]] See the 'todo' help file for higher priority todo items. =-= * In general use faster algorithms for large numbers when they become known. In particular, look at better algorithms for very large numbers -- multiply, square and mod in particular. * Implement an autoload feature. Associate a calc resource filename with a function or global variable. On the first reference of such item, perform an automatic load of that file. * Add error handling statements, so that QUITs, errors from the 'eval' function, division by zeroes, and so on can be caught. This should be done using syntax similar to: ONERROR statement DO statement; Something like signal isn't versatile enough. * Add a debugging capability so that functions can be single stepped, breakpoints inserted, variables displayed, and so on. * Figure out how to write all variables out to a file, including deeply nested arrays, lists, and objects. Add the ability to read and write a value in some binary form. Clearly this is easy for non-neg integers. The question of everything else is worth pondering. * Eliminate the need for the define keyword by doing smarter parsing. * Allow results of a command (or all commands) to be re-directed to a file or piped into a command. * Add some kind of #include and #define facility. Perhaps use the C pre-processor itself? * Support a more general input and output base mode other than just dec, hex or octal. * Implement a form of symbolic algebra. Work on this has already begun. This will use backquotes to define expressions, and new functions will be able to act on expressions. For example: x = `hello * strlen(mom)`; x = sub(x, `hello`, `hello + 1`); x = sub(x, `hello`, 10, `mom`, "curds"); eval(x); prints 55. * Place the results of previous commands into a parallel history list. Add a binding that returns the saved result of the command so that one does not need to re-execute a previous command simply to obtain its value. If you have a command that takes a very long time to execute, it would be nice if you could get at its result without having to spend the time to reexecute it. * Add a binding to delete a value from the history list. One may need to remove a large value from the history list if it is very large. Deleting the value would replace the history entry with a null value. * Add a binding to delete a command from the history list. Since you can delete values, you might as well be able to delete commands. * All one to alter the size of the history list thru config(). In some cases, 256 values is too small, in others it is too large. * Add a builtin that returns a value from the history list. As an example: histval(-10) returns the 10th value on the history value list, if such a value is in the history list (null otherwise). And: histval(23) return the value of the 23rd command given to calc, if such a value is in the history list (null otherwise). It would be very helpful to use the history values in subsequent equations. * Add a builtin that returns command as a string from the history list. As an example: history(-10) returns a string containing the 10th command on the history list, if a such a value is in the history list (empty string otherwise). And: history(23) return the string containing the 23rd command given to calc, if such a value is in the history list (empty string otherwise). One could use the eval() function to re-evaluate the command. * Allow one to optionally restore the command number to calc prompts. When going back in the history list, indicate the command number that is being examined. The command number was a useful item. When one is scanning the history list, knowing where you are is hard without it. It can get confusing when the history list wraps or when you use search bindings. Command numbers would be useful in conjunction with positive args for the history() and histval() functions as suggested above. * Add a builtin that returns the current command number. For example: cmdnum() returns the current command number. This would allow one to tag a value in the history list. One could save the result of cmdnum() in a variable and later use it as an arg to the histval() or history() functions. * Add a factoring builtin functions. Provide functions that perform multiple polynomial quadratic sieves, elliptic curve, difference of two squares, N-1 factoring as so on. Provide a easy general factoring builtin (say factor(foo)) that would attempt to apply whatever process was needed based on the value. Factoring builtins would return a matrix of factors. It would be handy to configure, via config(), the maximum time that one should try to factor a number. By default the time should be infinite. If one set the time limit to a finite value and the time limit was exceeded, the factoring builtin would return whatever if had found thus far, even if no new factors had been found. Another factoring configuration interface, via config(), that is needed would be to direct the factoring builtins to return as soon as a factor was found. * Allow one to config calc break up long output lines. The command: calc '2^100000' will produce one very long line. Many times this is reasonable. Long output lines are a problem for some utilities. It would be nice if one could configure, via config(), calc to fold long lines. By default, calc should continue to produce long lines. One option to config should be to specify the length to fold output. Another option should be to append a trailing \ on folded lines (as some symbolic packages use). * Allow one to use the READ and WRITE commands inside a function. * Remove or increase limits on factor(), lfactor(), isprime(), nextprime(), and prevprime(). Currently these functions cannot search for factors > 2^32. * Add read -once -try "filename" which would do nothing if "filename" was not a readable file. ## Copyright (C) 1999 Landon Curt Noll ## ## Calc is open software; you can redistribute it and/or modify it under ## the terms of the version 2.1 of the GNU Lesser General Public License ## as published by the Free Software Foundation. ## ## Calc 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 Lesser General ## Public License for more details. ## ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## ## @(#) $Revision: 30.1 $ ## @(#) $Id: wishlist,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/wishlist,v $ ## ## Under source code control: 1991/07/21 04:37:24 ## File existed as early as: 1991 ## ## chongo /\oo/\ http://www.isthe.com/chongo/ ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ ************* * todo ************* Calc Todo Items: The following items should be addressed sometime in the short to medium term future, if not before the next release. Code contributions are welcome. Send patches to: calc-contrib at asthe dot com Calc bug reports, however, should send to: calc-bugs at asthe dot com [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]] [[ NOTE: The EMail address uses 'asthe' and the web site URL uses 'isthe' ]] See the BUGS file or try the calc command: help bugs See also the 'wishlist' help files for the calc enhancement wish list. =-= Very High priority items: * Improve the way that calc parses statements such as if, for, while and do so that when a C programmer does. This works as expected: if (expr) { ... } However this WILL NOT WORK AS EXPECTED: if (expr) { ... } because calc will parse the if being terminated by an empty statement followed by a if (expr) ; { ... } See also "help statement", "help unexpected", "help todo", and "help bugs". * Consider using GNU autoconf / configure to build calc. * It is overkill to have nearly everything wind up in libcalc. Form a libcalcmath and a libcalclang so that an application that just wants to link with the calc math libs can use them without dragging in all of the other calc language, I/O, and builtin functions. * Fix any 'Known bugs' as noted in the BUGS file or as displayed by 'calc help bugs'. =-= High priority items: * Verify, complete or fix the 'SEE ALSO' help file sections. * Verify, complete or fix the 'LINK LIBRARY' help file sections. * Verify, complete or fix the 'LIMITS' help file sections. * Verify, complete or fix the 'SYNOPSIS' and 'TYPES' help file sections. * Perform a code coverage analysis of the 'make check' action and improve the coverage (within reason) of the regress.cal suite. * Address, if possible and reasonable, any Calc Mis-features as noted in the BUGS file or as displayed by 'calc help bugs'. * Internationalize calc by converting calc error messages and text strings (e.g., calc startup banner, show output, etc.) into calls to the GNU gettext internationalization facility. If somebody translated these strings into another language, setting $LANG would allow calc to produce error messages and text strings in that language. =-= Medium priority items: * Complete the use of CONST where appropriate: CONST is beginning to be used with read-only tables and some function arguments. This allows certain compilers to better optimize the code as well as alerts one to when some value is being changed inappropriately. Use of CONST as in: int foo(CONST int curds, char *CONST whey) while legal C is not as useful because the caller is protected by the fact that args are passed by value. However, the in the following: int bar(CONST char *fizbin, CONST HALF *data) is useful because it calls the compiler that the string pointed at by 'fizbin' and the HALF array pointer at by 'data' should be treated as read-only. One should make available a the fundamental math operations on ZVALUE, NUMBER and perhaps COMPLEX (without all of the other stuff) in a separate library. * Clean the source code and document it better. * Add a builtin function to access the 64 bit FNV hash which is currently being used internally in seed.c. ## Copyright (C) 1999-2007 Landon Curt Noll ## ## Calc is open software; you can redistribute it and/or modify it under ## the terms of the version 2.1 of the GNU Lesser General Public License ## as published by the Free Software Foundation. ## ## Calc 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 Lesser General ## Public License for more details. ## ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## ## @(#) $Revision: 30.2 $ ## @(#) $Id: todo,v 30.2 2007/09/08 02:52:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/todo,v $ ## ## Under source code control: 1999/10/20 07:42:55 ## File existed as early as: 1999 ## ## chongo /\oo/\ http://www.isthe.com/chongo/ ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ NAME ftell - return a file position SYNOPSIS ftell(fd) TYPES fd open file stream return non-negative integer or error value DESCRIPTION This function attempts to return the current value of the file position indicator for the stream. This is the number of characters (bytes) between the beginning of the file and the position of the next character for output in "w" or "w+" mode or for input. On failure, this returns an error value. EXAMPLE ; fd = fopen("/tmp/curds", "w") ; fputs(fd, "0123456789") ; ftell(fd) 10 ; fputs(fd, "abcdef") ; ftell(fd) 16 ; fseek(fd, 20, 0) ; ftell(fd) 20 ; fputs(fd, "01234") ; ftell(fd) 25 ; freopen(fd, "r") ; fscanf(fd, "%*5c") 0 ; ftell(fd) 5 LIMITS none LINK LIBRARY none SEE ALSO fseek, fgetpos, fsetpos, rewind, strerror ## Copyright (C) 1999 Landon Curt Noll ## ## Calc is open software; you can redistribute it and/or modify it under ## the terms of the version 2.1 of the GNU Lesser General Public License ## as published by the Free Software Foundation. ## ## Calc 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 Lesser General ## Public License for more details. ## ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## ## @(#) $Revision: 30.1 $ ## @(#) $Id: ftell,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/ftell,v $ ## ## Under source code control: 1995/03/04 11:33:21 ## File existed as early as: 1995 ## ## chongo /\oo/\ http://www.isthe.com/chongo/ ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ NAME rm - remove file(s) SYNOPSIS rm(["-f",] name, ...) TYPES name name of a file(s) return nil DESCRIPTION Removes one or more files. If the first arg is "-f", then a forced removal is performed and "no such file" errors are ignored. EXAMPLE ; rm("junk") ; rm("-f", "more/junk.cal", "curds", "whey") LIMITS name must be a non-zero length string LINK LIBRARY none SEE ALSO rmdir ## Copyright (C) 1999 Landon Curt Noll ## ## Calc is open software; you can redistribute it and/or modify it under ## the terms of the version 2.1 of the GNU Lesser General Public License ## as published by the Free Software Foundation. ## ## Calc 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 Lesser General ## Public License for more details. ## ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## ## @(#) $Revision: 30.1 $ ## @(#) $Id: rm,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/rm,v $ ## ## Under source code control: 1996/06/30 22:02:58 ## File existed as early as: 1996 ## ## chongo /\oo/\ http://www.isthe.com/chongo/ ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ NAME power - evaluate a numerical power to specified accuracy SYNOPSIS power(x, y, [, eps]) TYPES x number x number eps nonzero real, defaults to epsilon() return number DESCRIPTION For real or complex x and y, power(x,y,eps) returns a real or complex number for which the real and imaginary parts are multiples of epsilon differing from the true real and imaginary parts of the principal y-th power of x by less than 0.75 * abs(eps), usually by less than 0.5 * abs(eps). If the principal y-th power of x is a multiple of eps, it will be returned exactly. If y is a large integer but x^y is not large, and accuracy represented by eps is all that is required, power(x,y,eps) may be considerably faster than appr(x^y, eps, 24), the difference between the two results being probably at most abs(eps). EXAMPLE ; print power(1.2345, 10, 1e-5), power(1.2345, 10, 1e-10) 8.22074 8.2207405646 ; print power(1+3i, 3, 1e-5), power(1 + 3i, 2+ 1i, 1e-5) -26-18i -2.50593-1.39445i ; print power(1+ 1e-30, 1e30, 1e-20) 2.71828182845904523536 ; print power(1i, 1i, 1e-20) .20787957635076190855 ; print power(exp(1, 1e-20), pi(1e-20) * 1i/2, 1e-20) 1i LIMITS If x = 0, y in power(x,y,eps) has to have positive real part, except in the case of y = 0; power(0, 0, eps) is the multiple of eps nearest 1. eps > 0 LINK LIBRARY void powervalue(VALUE *x, VALUE *y, VALUE *eps, VALUE *result) NUMBER *qpower(NUMBER *x, NUMBER *y, NUMBER *eps) COMPLEX *c_power(COMPLEX *x, COMPLEX *y, NUMBER *eps) SEE ALSO root ## Copyright (C) 1999 Landon Curt Noll ## ## Calc is open software; you can redistribute it and/or modify it under ## the terms of the version 2.1 of the GNU Lesser General Public License ## as published by the Free Software Foundation. ## ## Calc 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 Lesser General ## Public License for more details. ## ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## ## @(#) $Revision: 30.1 $ ## @(#) $Id: power,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/power,v $ ## ## Under source code control: 1995/10/25 04:03:46 ## File existed as early as: 1995 ## ## chongo /\oo/\ http://www.isthe.com/chongo/ ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ NCOPYINGOmodifyP fpathopenQstrerrorR coshShnrmodTlcmfactU nextprimeV acosW combXepsilonYsubstrZ dp[param\ str]change^fputc_ new_custom`systimeaisprimeboldvaluecblkfreedmatfilleoperatorfbtruncgilog10hisinti acscjmatsumk apprl summisrandomnilog2o expp quoq denrprevcands ilogtsearchubindingsvnewerrorwismatx issqy hashz bugs{hypot| ltol} bug~ detrcpow sinfopen interruptcscriptruntime sha1 base lncmdbuftrunc fgetfieldfgetcisqrtassign rand testinversemattrace free calc - arbitrary precision calculator This file is Copyrighted ------------------------ This file is covered under the following Copyright: Copyright (C) 1999-2008 Landon Curt Noll All rights reserved. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. # @(#) $Revision: 30.2 $ # @(#) $Id: COPYING,v 30.2 2008/10/24 10:46:52 chongo Exp $ # @(#) $Source: /usr/local/src/cmd/calc/RCS/COPYING,v $ =-= Calc is covered by the GNU Lesser General Public License -------------------------------------------------------- Calc is open software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation version 2.1 of the License. Calc is several binary link libraries, several modules, associated interface definition files and scripts used to control its compilation and installation. Calc 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 Lesser General Public License for more details. A copy of the GNU Lesser General Public License is distributed with calc under the filename: COPYING-LGPL You may display this file by the calc command: help copying You may display the GNU Lesser General Public License by the calc command: help copying-lgpl You should have received a copy of the version 2.1 GNU Lesser General Public License with calc; if not, write to the following address: Free Software Foundation, Inc. 51 Franklin Street Fifth Floor Boston, MA 02110-1301 USA The contact addresses for calc is as follows: Web: http://www.isthe.com/chongo/tech/comp/calc/email.html To join the low volume calc mailing list. Send a EMail message to: calc-tester-request at asthe dot com Your subject must contain the words: calc mailing list subscription You may have additional words in your subject line. Your message body (not the subject) should consist of: subscribe calc-tester address end name your_full_name where ``address'' is your EMail address and ``your_full_name'' is your full name. Feel free to follow the name line with additional EMail text as desired. =-= Calc bug reports and calc bug fixes should be sent to: calc-bugs at asthe dot com [[ NOTE: Replace 'at' with @, 'dot' is with . and remove the spaces ]] [[ NOTE: The EMail address uses 'asthe' and the web site URL uses 'isthe' ]] Your subject must contain the words: calc bug report You may have additional words in your subject line. =-= Calc's relationship to the GNU Lesser General Public License ------------------------------------------------------------ In section 0 of the GNU Lesser General Public License, one finds the following definition: The "Library", below, refers to any such software library or work which has been distributed under these terms. Calc is distributed under the terms of the GNU Lesser General Public License. In the same section 0, one also find the following: 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. There are at least two calc binary link libraries found in calc: libcalc.a libcustcalc.a Clearly all files that go into the creation of those binary link libraries are covered under the License. The ``scripts used to control compilation and installation of the of the library'' include: * Makefiles * source files created by the Makefiles * source code used in the creation of intermediate source files All of those files are covered under the License. The ``associated interface definition files'' are those files that: * show how the calc binary link libraries are used * test the validity of the binary link libraries * document routines found in the binary link libraries * show how one can interactively use the binary link libraries Calc provides an extensive set of files that perform the above functions. * files under the sample sub-directory * files under the help sub-directory * files under the lib sub-directory * the main calc.c file The ``complete source code'' includes ALL files shipped with calc, except for the exception files explicitly listed in the ``Calc copyrights and exception files'' section below. =-= Calc copyrights and exception files ----------------------------------- With the exception of the files listed below, Calc is covered under the following GNU Lesser General Public License Copyrights: Copyright (C) year David I. Bell Copyright (C) year David I. Bell and Landon Curt Noll Copyright (C) year David I. Bell and Ernest Bowen Copyright (C) year David I. Bell, Landon Curt Noll and Ernest Bowen Copyright (C) year Landon Curt Noll Copyright (C) year Ernest Bowen and Landon Curt Noll Copyright (C) year Ernest Bowen Copyright (C) year Petteri Kettunen and Landon Curt Noll These files are not covered under one of the Copyrights listed above: sha1.c sha1.h COPYING COPYING-LGPL cal/qtime.cal cal/screen.cal The file COPYING-LGPL, which contains a copy of the version 2.1 GNU Lesser General Public License, is itself Copyrighted by the Free Software Foundation, Inc. Please note that the Free Software Foundation, Inc. does NOT have a copyright over calc, only the COPYING-LGPL that is supplied with calc. This file, COPYING, is distributed under the Copyright found at the top of this file. It is important to note that you may distribute verbatim copies of this file but you may not modify this file. Some of these exception files are in the public domain. Other files are under the LGPL but have different authors that those listed above. In all cases one may use and distribute these exception files freely. And because one may freely distribute the LGPL covered files, the entire calc source may be freely used and distributed. =-= General Copyleft and License info --------------------------------- For general information on Copylefts, see: http://www.gnu.org/copyleft/ For information on GNU Lesser General Public Licenses, see: http://www.gnu.org/copyleft/lesser.html http://www.gnu.org/copyleft/lesser.txt =-= Why calc did not use the GNU General Public License --------------------------------------------------- It has been suggested that one should consider using the GNU General Public License instead of the GNU Lesser General Public License: http://www.gnu.org/philosophy/why-not-lgpl.html As you can read in the above URL, there are times where a library cannot give free software any particular advantage. One of those times is when there is significantly similar versions available that are not covered under a Copyleft such as the GNU General Public License. The reason why calc was placed under the GNU Lesser General Public License is because for many years (1984 thru 1999), calc was offered without any form of Copyleft. At the time calc was placed under the GNU Lesser General Public License, a number of systems and distributions distributed calc without a Copyleft. NAME modify - modify a list or matrix by changing the values of its elements SYNOPSIS modify(A, fname) TYPES A lvalue with list, matrix or objectvalue fname string, the name of a user-defined function return null value if successful, otherwise an error value DESCRIPTION The value of each element of A is replaced by the value at that value of the user-defined function with name fname. Thus, modify(A, "f") has the effect of for (i = 0; i < size(A); i++) A[[i]] = f(A[[i]]); An error value is returned if A is not of acceptable type, if A has no-change protection, or if there is no user-defined function with name fname. The assignments are executed even if the protection status of some elements A[[i]] would normally prevent the assignment of f(A[[i]]) to A[[i]]. The modified elements retain whatever kinds of protection they had as well as gaining any other kinds of protection in the values returned by the function. To obtain a modified copy of A without changing values in A, one may use Amod = A; modify(A, fname) or more simply modify(Amod = A, fname). EXAMPLE ; define f(x) = x^2 ; A = list(2,4,6) ; modify(A, "f") ; print A list (3 elements, 3 nonzero): [[0]] = 4 [[1]] = 16 [[3]] = 36 LIMITS none LINK LIBRARY none SEE ALSO makelist ## Copyright (C) 1999 Landon Curt Noll ## ## Calc is open software; you can redistribute it and/or modify it under ## the terms of the version 2.1 of the GNU Lesser General Public License ## as published by the Free Software Foundation. ## ## Calc 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 Lesser General ## Public License for more details. ## ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## ## @(#) $Revision: 30.1 $ ## @(#) $Id: modify,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/modify,v $ ## ## Under source code control: 1995/07/10 02:09:31 ## File existed as early as: 1995 ## ## chongo /\oo/\ http://www.isthe.com/chongo/ ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ NAME fpathopen - open an absolute filename, or a relative filename along a search path SYNOPSIS fpathopen(filename, mode [,searchpath]) TYPES filename string mode string searchpath string return file DESCRIPTION This function opens the file named filename, potentially searching for the file along a search path given by searchpath. If searchpath is not given, then CALCPATH search path is used. If the filename is absolute, or it has an implied path, then searchpath is ignored and the filename is opened directly. Absolute filenames, and filenames with an implied path are files that begin with: / # absolute path ./ # implied path through the current working directory ../ # implied path through the current working directory parent ~ # absolute path going through a home directory A search path is a :-separated list of directories used to search for a filename. For example: fpathopen("whey", "r", ".:/tmp:/var/tmp:~chongo/pub:~/tmp"); will cause this function to open the first readable file it files while searching through these paths in order: ./whey /tmp/whey /var/tmp/whey ~chongo/pub/whey ~/tmp/whey IMPORTANT NOTE: This function searches along a path by attempting to open files under the given mode. If the mode allows for writing and a file can be created, then that file is returned. This call open "./gleet" for writing if the current directory is writable, even if "./gleet" did not previously exist: fpathopen("gleet", "r", ".:/tmp:/var/tmp:~chongo/pub:~/tmp"); This call will likely open (and create if needded) for appending, the file "/tmp/log" assuming that the user is not allowed to create files in the previous system directories: fpathopen("log", "a", "/:/etc:/bin:/usr/bin:/tmp"); The CALCPATH search path is taken from the $CALCPATH environment variable or if no such variable exists, a compiled in default search path is used. See "help environment" and "help calcpath" for more information on CALCPATH. It should be noted that while CALCPATH is typically used to find resource files (*.cal files), this function is not restricted those files. Any filename may be opened. A file can be opened for either reading, writing, or appending. The mode is controlled by the mode flag as follows: allow allow file is positioned file(*) mode reading writing truncated at mode ---- ------- ------- --------- --------- ---- r Y N N beginning text rb Y N N beginning binary r+ Y N N beginning text r+b Y N N beginning binary rb+ Y N N beginning binary w N Y Y beginning text wb N Y Y beginning binary w+ Y Y Y beginning text w+b Y Y Y beginning binary wb+ Y Y Y beginning binary a N Y Y end text ab N Y Y end binary a+ Y Y Y end text a+b Y Y Y end binary ab+ Y Y Y end binary (*) NOTE on 'b' / binary/text mode: The 'b' or fopen binary mode has no effect on POSIX / Linux / Un*x-like systems. On those systems a text file is the same as a binary file (as it should be for any modern-day operating system). Adding 'b' to an fopen has no effect and is ignored. Some non-POSIX systems sucn as MS Windoz treat text files and binary files differently. In text mode MS Windoz consider "\r\n" and end-of-line character. On an Apple MAC, the text mode end-of-line character is "\r". Names of files are subject to ~ expansion just like the C or Korn shell. For example, the file name: ~/lib/gleet refers to the file 'gleet' under the directory lib located in your home directory. The file name: ~chongo/was_here refers to the a file 'was_here' under the home directory of the user 'chongo'. If the open is successful, a value of type 'file' will be returned. You can use the 'isfile' function to test the return value to see if the open succeeded. You should assign the return value of fopen to a variable for later use. File values can be copied to more than one variable, and using any of the variables with the same file value will produce the same results. Standard input, standard output and standard error are always opened and cannot be closed. The truth value of an opened file is TRUE. If the open is unsuccessful, the numeric value of errno is returned. You can the errno() builtin to determine what the errno number means. EXAMPLE ; fd = fpathopen("motd", "r", "/etc:.") ; print fd "/etc/motd" ; fd FILE 3 "/etc/motd" (reading, pos 0) ; fd2 = fpathopen("lucas.cal", "r") ; print fd2 "/usr/share/calc/lucas.cal" ; fd2 FILE 4 "/usr/share/calc/lucas.cal" (reading, pos 0) ; fd3 = fpathopen("randmprime.cal", "r", calcpath()) ; print fd3 "/usr/share/calc/randmprime.cal" ; fd3 FILE 5 "/usr/share/calc/randmprime.cal" (reading, pos 0) ; fd4 = fpathopen("output", "w", "~/tmp:/tmp:/var/tmp") ; print fd4 "/home/chongo/tmp/output" ; fd4 FILE 6 "/home/chongo/tmp/output" (writing, pos 0) ; !mkdir -p /tmp/log ; !touch /tmp/log/file ; logfile = fpathopen("log/file", "a", "/tmp:/var/tmp") ; print logfile "/tmp/log/file" ; logfile FILE 7 "/home/chongo/tmp/output" (writing, pos 0) ; badfile = fpathopen("no_such_file", "r") ; if (!isfile(badfile)) print "error #" errno(badfile) : ":" : strerror(badfile); error #2: No such file or directory LIMITS none LINK LIBRARY none SEE ALSO errno, fclose, feof, ferror, fflush, fgetc, fgetline, fgets, files, fopen, fprintf, fputc, fputs, fseek, fsize, ftell, isfile, printf, prompt, environment, calcpath ## Copyright (C) 2006 Landon Curt Noll ## ## Calc is open software; you can redistribute it and/or modify it under ## the terms of the version 2.1 of the GNU Lesser General Public License ## as published by the Free Software Foundation. ## ## Calc 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 Lesser General ## Public License for more details. ## ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## ## @(#) $Revision: 30.1 $ ## @(#) $Id: fpathopen,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/fpathopen,v $ ## ## Under source code control: 2006/05/07 23:56:04 ## File existed as early as: 2006 ## ## chongo /\oo/\ http://www.isthe.com/chongo/ ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ NAME strerror - returns a string describing an error value SYNOPSIS strerror([x]) TYPES x error-value or integer in [0, 32767], defaults to errno() return string DESCRIPTION If x is the error-value with index n, strerror(x) and strerror(n) return one of: a system-generated message, a calc-generated description, a user-defined description created by newerror(str), the string "Error n", where, in the last form, n is represented decimally. EXAMPLE System error messages may be different for different systems. ; errmax(errcount()+3) 0 ; strerror(2) "No such file or directory" ; x = 3 * ("a" + "b") ; print strerror(x) Bad arguments for + ; a = newerror("alpha") ; print strerror(a) alpha ; print strerror(999) Error 999 ; a = 1/0 ; print strerror() Division by zero LIMITS none LINK LIBRARY none SEE ALSO strcat, strcpy, strlen, strncmp, strncpy, strpos, strprintf, strscan, strscanf, substr, errcount, errmax, error, iserror, errno, newerror, errorcodes, stoponerror ## Copyright (C) 1999-2006 Landon Curt Noll ## ## Calc is open software; you can redistribute it and/or modify it under ## the terms of the version 2.1 of the GNU Lesser General Public License ## as published by the Free Software Foundation. ## ## Calc 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 Lesser General ## Public License for more details. ## ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## ## @(#) $Revision: 30.1 $ ## @(#) $Id: strerror,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/strerror,v $ ## ## Under source code control: 1996/04/30 03:05:18 ## File existed as early as: 1996 ## ## chongo /\oo/\ http://www.isthe.com/chongo/ ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ NAME cosh - hyperbolic cosine SYNOPSIS cosh(x [,eps]) TYPES x real eps nonzero real, defaults to epsilon() return real DESCRIPTION Calculate the cosh of x to the nearest or next to nearest multiple of epsilon, with absolute error less than .75 * abs(eps). cosh(x) = (exp(x) + exp(-x))/2 EXAMPLE ; print cosh(1, 1e-5), cosh(1, 1e-10), cosh(1, 1e-15), cosh(1, 1e-20) 1.54308 1.5430806348 1.543080634815244 1.54308063481524377848 LIMITS none LINK LIBRARY NUMBER *qcosh(NUMBER *x, NUMBER *eps) SEE ALSO sinh, tanh, sech, csch, coth, epsilon ## Copyright (C) 1999 Landon Curt Noll ## ## Calc is open software; you can redistribute it and/or modify it under ## the terms of the version 2.1 of the GNU Lesser General Public License ## as published by the Free Software Foundation. ## ## Calc 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 Lesser General ## Public License for more details. ## ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## ## @(#) $Revision: 30.1 $ ## @(#) $Id: cosh,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/cosh,v $ ## ## Under source code control: 1994/03/19 01:40:28 ## File existed as early as: 1994 ## ## chongo /\oo/\ http://www.isthe.com/chongo/ ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ NAME hnrmod - compute mod h * 2^n +r SYNOPSIS hnrmod(v, h, n, r) TYPES v integer h integer n integer r integer return integer DESCRIPTION Compute the value: v % (h * 2^n +r) where: h > 0 n > 0 r == -1, 0 or 1 This builtin in faster than the standard mod in that is makes use of shifts and additions when h == 1. When h > 1, a division by h is also needed. EXAMPLE ; print hnrmod(2^177-1, 1, 177, -1), hnrmod(10^40, 17, 51, 1) 0 33827019788296445 LIMITS h > 0 2^31 > n > 0 r == -1, 0 or 1 LINK LIBRARY void zhnrmod(ZVALUE v, ZVALUE h, ZVALUE zn, ZVALUE zr, ZVALUE *res) SEE ALSO mod ## Copyright (C) 1999 Landon Curt Noll ## ## Calc is open software; you can redistribute it and/or modify it under ## the terms of the version 2.1 of the GNU Lesser General Public License ## as published by the Free Software Foundation. ## ## Calc 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 Lesser General ## Public License for more details. ## ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## ## @(#) $Revision: 30.1 $ ## @(#) $Id: hnrmod,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/hnrmod,v $ ## ## Under source code control: 1997/07/02 07:10:43 ## File existed as early as: 1997 ## ## chongo /\oo/\ http://www.isthe.com/chongo/ ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/ NAME lcmfact - lcm of positive integers up to specified integer SYNOPSIS lcmfact(n) TYPES n positive integer return positive integer DESCRIPTION Returns the lcm of the integers 1, 2, ..., n. EXAMPLE ; for (i = 1; i <= 15; i++) print lcmfact(i),:; 1 2 6 12 60 60 420 840 2520 2520 27720 27720 360360 360360 360360 LIMITS n < 2^24 LINK LIBRARY NUMBER *qlcmfact(NUMBER *n) void zlcmfact(ZVALUE z, ZVALUE *dest) SEE ALSO lcm, fact ## Copyright (C) 1999 Landon Curt Noll ## ## Calc is open software; you can redistribute it and/or modify it under ## the terms of the version 2.1 of the GNU Lesser General Public License ## as published by the Free Software Foundation. ## ## Calc 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 Lesser General ## Public License for more details. ## ## A copy of version 2.1 of the GNU Lesser General Public License is ## distributed with calc under the filename COPYING-LGPL. You should have ## received a copy with calc; if not, write to Free Software Foundation, Inc. ## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ## ## @(#) $Revision: 30.1 $ ## @(#) $Id: lcmfact,v 30.1 2007/03/16 11:10:42 chongo Exp $ ## @(#) $Source: /usr/local/src/cmd/calc/help/RCS/lcmfact,v $ ## ## Under source code control: 1995/12/18 12:34:57 ## File existed as early as: 1995 ## ## chongo /\oo/\ http://www.isthe.com/chongo/ ## Share and enjoy! :-) http://www.isthe.com/chongo/tech/comp/calc/