pkgsrc/math/mathomatic/Makefile

32 lines
824 B
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.98 2012/07/01 19:05:20 dholland Exp $
#
Update to Mathomatic 16.0.0 CHANGES MADE TO MATHOMATIC 15.8.5 TO BRING IT UP TO THE NEXT VERSION: Code, documentation, and user interface improvements, corrections, and cleanup. Fixed many possible bugs, some where the wrong level global expression buffers were being used. 05/26/12 - Push command improved with better responses. Same functionality. In the source code, tune-up variable integer_coefficients was renamed to "factor_out_all_numeric_gcds", because Mathomatic always tries to have integer coefficients this year, but it doesn't always factor out all numeric GCDs unless factor_out_all_numeric_gcds is true, or the factor command is used. The default is false, for more orderly and revealing coefficients. Of course, much of what Mathomatic does is try to improve readability and simplicity. There is no need to set this variable, just use the factor command. 05/27/12 - Removed C declarations for memmove(3), the defaults in /usr/include/string.h are probably better and what's wanted in every case. It would be very odd if this didn't work 100%. 05/28/12 - readline history file renamed to "~/.matho_history" from "~/.mathomatic_history". File name was too long for CygWin. Tested thoroughly compiling, installing, and running under the latest CygWin. Works fine, except for rlwrap. "rlwrap -v" returns with error, a successful return is how I test for its existence. Made output redirection work with the "list primes" command. 06/02/12 - Cleanup of Linux, Mac OS X, and Windows binary distributions. The Windows binary distribution now includes m4 scripts, in case CygWin is installed, allowing use of m4 Mathomatic in Windows. Fixed MinGW version to not output two carriage returns at the end of every line of list command output. 06/03/12 - If compiled with -DSHOW_RESOURCES, will give total CPU usage and RSS size in the "version status" command. Requires OS support. Some OSes will show even more information. Uses getrusage(2). 06/04/12 - Allow breaking out of user line-input requests with Control-C. Still have to hit the Enter key, but the command will be aborted. 06/05/12 - Added "lib/example.c", the simplest example yet of Symbolic Math Library usage. Compile with "compile.testmain" or practice compiling it by hand. The simplify command now returns the number of expressions simplified, so you can tell if "simplify sign" worked. The solve command can now require verification, by using the "verifiable" option, instead of the "verify" option. This causes unverifiable solves to return with failure, aborting any reads. Fixed missing code in internal C function free_mem(). I don't think it was used by anyone. A call to free_mem() is now made on exit, if Mathomatic is compiled with -DVALGRIND, to check for memory leaks. 06/08/12 - Added polynomial factoring to GCD result of divide command. It is always handy to know what the factors are of the GCD. Allow comma (,) at the end of most input lines. A comma now terminates an expression instead of giving an error. Allow commas all over the place, where-ever logical, in any Mathomatic command-line. They are used as separators, more so than spaces. 06/09/12 - Cleaned up variables command to always allow the count parameter, and to line up everything with 8 character wide tabs. Added ability to place the definite integration bounds on the integrate command-line, just like the nintegrate command. Added titles to most help command pages. 06/10/12 - The "factor number" command works much nicer now, and allows comma separators and zero. Developers should note that to remain the same as past versions, HTML mode needs to be "set html all" to output HTML at all times in both the application and the symbolic math library, even when redirecting output. Now setting all HTML mode with "make pdfsheet". "set html" only outputs HTML code to standard output. 06/13/12 - Added warning in "misc/known_bugs.txt" about LLVM/Clang optimizer failure when compiling Mathomatic with LLVM/Clang instead of gcc. If you enable any optimization at all, entering (32^.5) and the like will hang Mathomatic, putting it in an endless loop. So when compiling Mathomatic with LLVM/Clang, always disable optimization with "-O0", so that it will then run and pass all of the tests in 1 second and not be infinitely slower. Mathomatic will hang during "make test" if compiled with optimization enabled using LLVM. Mathomatic is not noticeably slower when compiled without any optimization, because everything is memmove(3)s and floating point arithmetic. 06/15/12 - Added repeat option to replace command. A handy feature that lets you try plugging different values into an equation. It checks if the result is an identity, too. 06/18/12 - The version command now has a "status" option, which behaves as before, displaying all version and status information. The version command by itself now only displays the Mathomatic version number. Running "mathomatic -v" is now a good way of testing for the existence of Mathomatic on your system, only outputting the version number to standard output and exiting successfully. 06/19/12 - Removed the parenthesizing of variable names in all messages. If the current expression is a non-equation, then prefixing or suffixing an expression with "=" will add that expression as the other equation side now, conveniently making it an equation you can solve. 06/22/12 - Added equation number ranges option to tally command. Type "tally -" to resume if the current equation hasn't changed. Type "tally all" to add together all stored expressions as the starting value. Specifying equation numbers or ranges will silently add them, then prompt for the next things to add. The average option now displays the number of entries (count) each time the average is displayed. When you exit by typing an empty line, the current total is saved in the next available equation space and made current, so it can easily resume with "tally -". "-" by itself always means the current equation. gnuplot now works with MS-Windows better. Tried running a Windows gnuplot test from scratch, without Cygwin, and it didn't work. It should be mostly fixed now. So go ahead and try plotting in Windows, after downloading and installing gnuplot. Please complain if any problems. Fixed a long-running problem with the plot command, by asking the user questions, only if needed, so that gnuplot will not give an error if you are multi-expression plotting. 06/23/12 - Moved load_rc() out of main.c so that the Mathomatic startup set options file can be loaded by the library, if the developer wishes. Changed a few things so that "set save" and "set no save" will work if load_rc() is called beforehand. 06/25/12 - The simplify command has been fixed for optimal integer coefficient factoring results and so "180*(sides-2)" simplification works nicely, by keeping the result the same as the start by factoring out rational constants greater than 1 (this is new), along with less than 1, if the coefficients remain or become integers. Many things cleaned up and finished, like the official documentation, the "code integer" command, and "examples/fact.c". 06/27/12 - Allow an ASCII string after the "set save" command, to save only that string in ~/.mathomaticrc, so that string, which should be set options, is for every Mathomatic session to start with. For example, "set save bold color" will start out Mathomatic in bold color mode every time. Enter "set no save" to remove. "set save" by itself saves all of the current set options for every future session. Mathomatic version 16.0.0 released Friday 06/29/12.
2012-07-01 10:02:04 +02:00
DISTNAME= mathomatic-16.0.0
PKGREVISION= 1
CATEGORIES= math
Update to Mathomatic 15.2.0 CHANGES MADE TO MATHOMATIC 15.2.0 TO BRING IT UP TO THE NEXT VERSION: All makefiles were improved. Library test/example program is renamed to "testmain". Package maintainers please take note: support for the DESTDIR environment variable was added to the makefiles; for proper operation when packaging version 15.2.1 or higher, please remove any patches for missing DESTDIR support. m4 Mathomatic should work now when included in the Mathomatic package (make m4install). Thank you for packaging Mathomatic! If I did anything wrong, please let me know. 8/26/10 - Added the -e option, which processes mathematical expressions and Mathomatic commands instead of input files on the shell command line. For example, entering "mathomatic -eq 2+3" gives "answer = 5". This functionality has been requested many times by Mathomatic command line users. A complete example: CHANGES MADE TO MATHOMATIC 15.1.6 TO BRING IT UP TO THE NEXT VERSION: Minor improvements were made to the user documentation. 8/22/10 - Removed "Complex number roots approximated" warning message, since this happens often. Capitalized E, I, PI, and Pi are now accepted as the universal constants e, i, and pi, without needing to enter "set no case". This allows Mathomatic to easily accept Mathematica style expression input. m4 Mathomatic now additionally accepts Mathematica style capitalized function input. matho and rmath now display elapsed, CPU, and system times in seconds upon exit. 8/23/10 - Fixed #equation-number entry at the main prompt to always work and allow an expression or equation following on the same line to be entered at that equation space. For example: "#10 y=1/x" will work now; previously only worked if equation space number 10 was previously allocated and used. The way it works is: all equation spaces up to and including number 10 are allocated, if not already allocated, upon entry of "#10". Equations spaces are allocated with the memory allocator malloc(3). CHANGES MADE TO MATHOMATIC 15.1.5 TO BRING IT UP TO THE NEXT VERSION: 7/26/10 - Disabled ncurses call for auto-color detection when CYGWIN is defined while compiling the source code, due to a reported problem of readline failing with ncurses in Cygwin. 7/28/10 - Disabled readline history save file for the Cygwin port, because it is a filename that starts with a period. 7/31/10 - Added "set fractions_display" option, to allow disabling the automatic conversion of fractions like .5 to 1/2 for display. Developer requested and useful in the symbolic math library, when numerical fraction output isn't wanted. 8/01/10 - Fixed a memory leak when ignoring the output string in the symbolic math library. 8/04/10 - Preserve overflowed powers like 2^2222 rather than aborting with an error message. Allow simplification of math like 2*2^2222 and 2/2^2222. 8/08/10 - matho-primes runs twice as fast with the -ffast-math gcc compilation option, which is now enabled by default. Don't try -ffast-math with the main Mathomatic program though, because then Mathomatic won't work properly. CHANGES MADE TO MATHOMATIC 15.1.4 TO BRING IT UP TO THE NEXT VERSION: Many minor tweaks and improvements. 7/03/10 - Makefiles and compile scripts were corrected and enhanced per http://www.gnu.org/prep/standards/ 7/06/10 - Changed all "#if true" and "#if false" conditional commenting to "#if 1" and "#if 0" in the C source code, thanks to Min Sik Kim of NetBSD pkgsrc. CHANGES MADE TO MATHOMATIC 15.1.3 TO BRING IT UP TO THE NEXT VERSION: All of the Unix man pages and user manuals for Mathomatic were fixed. The compare and "solve verify" commands now simplify more thoroughly with "repeat simplify" for better expression equality determination. 6/17/10 - Greatly improved file operation error reporting by using the perror(3) function. 6/18/10 - Fixed categories in "icons/mathomatic.desktop"; Mathomatic now goes under valid categories, mainly Education. CHANGES MADE TO MATHOMATIC 15.1.2 TO BRING IT UP TO THE NEXT VERSION: 6/6/10 - I made mistakes in the improvement to the simplify command of version 15.1.2, the original working simplify logic of version 15.1.1 is now restored, sorry. CHANGES MADE TO MATHOMATIC 15.1.1 TO BRING IT UP TO THE NEXT VERSION: A general cleanup was done. A small improvement was made to the final result of the simplify and fraction commands. Showing intermediate results in the calculate, sum, and product commands is now done with "set debug 1". 5/28/10 - Added "tests/collatz.in", the Collatz conjecture as an automatically computable equation. CHANGES MADE TO MATHOMATIC 15.1.0 TO BRING IT UP TO THE NEXT VERSION: Code and documentation cleanup. 5/21/10 - Added "primes/matho-sum", a utility that sums its command line arguments or standard input. Use "matho-primes 0 2000000 | matho-sum" to find the sum of all primes less than 2,000,000. Solves Project Euler problem #10: http://projecteuler.net/index.php?section=problems&id=10 5/23/10 - Primes (') are allowed in variable names now, if not using the symbolic math library, so that the derivative, integrate, and nintegrate commands can change the dependent variable to y', y'', etc. This can be turned on in the symbolic math library by the command "set special_variable_characters='". Non-alphanumeric characters in variable names are now converted to underline characters (_) when exporting to a programming language or to a different program. CHANGES MADE TO MATHOMATIC 15.0.8 TO BRING IT UP TO THE NEXT VERSION: 5/10/10 - Added "help constants" command. 5/11/10 - Integer variables are now specified by using a variable name that starts with "integer", like "integer1", "integer_x", etc. Currently only the modulus operator "%" checks for integer variables, to help with simplification. 5/12/10 - Corrected the output string type of the symbolic math library API. It was erroneously declared as type "const", possibly causing a memory leak. 5/13/10 - Moved and adapted "makefile.lib" to "lib/makefile", so the symbolic math library build is isolated. Previously "make clean" was required between different builds. All makefiles require GNU make now. CHANGES MADE TO MATHOMATIC 15.0.7 TO BRING IT UP TO THE NEXT VERSION: 4/26/10 - Allow "make pdf" to generate PDF documentation from the HTML documentation with htmldoc. Please read the comments in the makefile for all available options. 4/29/10 - For every makefile, CFLAGS has been modified to include OPTFLAGS as required by the Fedora Linux build system, and OPTFLAGS defaults to the optional gcc specific flags like optimization. In the symbolic math library, made available the equation number of the result of calling the API, if also stored in an equation space. The result equation number is stored in the global "result_en". Useful if you want to know where the result was stored, to act on it with further commands. CHANGES MADE TO MATHOMATIC 15.0.6 TO BRING IT UP TO THE NEXT VERSION: Corrections and improvements to the documentation were made. 4/3/10 - Vastly improved the "factor number" user interface, now factors integer expressions like 2^32-1. "factor number" is disabled in library mode. 4/13/10 - The real and imaginary commands no longer fail when the expression is not complex, just a warning is given. 4/14/10 - Changed normal display of "-1*" to "-", for prettier 2D expression output, so things like "-a" display properly, not as "-1*a". CHANGES MADE TO MATHOMATIC 15.0.5: 1/28/10 - Added a Python utility called "primorial" to the Prime Number Tools install that multiplies together the results of matho-primes, displaying the primorials of the integers given on the command line. 3/18/10 - Changed author email address to "gesslein@linux.com". 3/23/10 - Catch SIGHUP and SIGTERM signals for proper termination of the Mathomatic program; readline was messing up when Mathomatic was terminated by closing the shell window. The plot command now always plots expressions with grid marks displayed for reference. CHANGES MADE TO MATHOMATIC 15.0.4: 1/21/10 - In the makefile, changed the HTML man page generator back to rman because groff HTML output looks really bad and rman allows linking to other man pages. groff is no longer used. 1/24/10 - Fixed "make m4install", the installed rmath and matho programs weren't working. 1/27/10 - Added GNU LGPL license notices to every C source file with a copyright notice, for proper protections. CHANGES MADE TO MATHOMATIC 15.0.3: 1/9/10 - Fixed a problem only in the version 15.0.3 makefile, where it didn't respect the CC environment variable set by the user, instead it always used "gcc" as the C compiler. CHANGES MADE TO MATHOMATIC 15.0.2: 12/27/09 - Moved get_screen_size() from main.c to am.c because it is used in the library when compile-time options UNIX or CYGWIN are defined. Thanks to Cygwin port maintainer Reini Urban for noticing and fixing this problem. Defining UNIX or CYGWIN in library mode is not recommended. 12/31/09 - Added code to allow any command to be preceded by "repeat", which sets the repeat flag for the following command. Most commands ignore the repeat flag. 1/1/10 - Ported divide and roots commands to be repeatable. Also repeatable are the calculate and eliminate commands. 1/2/10 - Allow Taylor series computation even if the specified differentiation variable is not found in the expression, giving a warning. Ported simplify command to be a repeatable full simplify; that is, typing "repeat simplify" repeatedly runs the simplify command until the result stabilizes to the smallest size expression. 1/7/10 - Thanks to pretty C code submitted by Simon Geard, the code and variables commands have been made much more readable. 1/8/10 - Made Mathomatic easier to compile under Solaris, thanks to Michael Pogue of Sun. Fixed failure to compile under BSD Unix when compiling with readline support. CHANGES MADE TO MATHOMATIC 15.0.1: 12/19/09 - The last few versions fix the ugliness caused by the GCD factoring change made on 6/22/09. Today's change factors out the numerical GCD of rational coefficients as needed to simplify. Most simplification results should be beautiful and the simplest possible again now, without the misleading observed magnitude caused by always factoring out the GCD, which was why the change of 6/22/09 was made. CHANGES MADE TO MATHOMATIC 15.0.0: 12/12/09 - Fixed a problem with the -q (quiet mode) option being ignored if the session options were ever saved with the "set save" command. 12/13/09 - Added code to allow Mathomatic output to be redirected by default. Fixed the derivative command to be successful even when the result is 0, when compiled as a library. 12/14/09 - Added ability to log symbolic math library results, and made command behavior more consistent in the library by always returning the final result string. 12/16/09 - The factor command now factors more by factoring out the GCD of rational coefficients. CHANGES MADE TO MATHOMATIC 14.6.3 TO BRING IT UP TO 15.0.0: Cleanup and more bug fixes. 11/26/09 - Added detection of the terminal's ANSI color availability, when readline is enabled. 11/28/09 - Added detection of divide by zero and NaN when using the "solve verify" command, for more correct results. Solving now factors out the GCD of rational coefficients, for improved results. The fixes today are from errors solving equations like (2*x/(x - 3)) + 3 = 6/(x - 3) 11/29/09 - Disallow the variable named "nan". NaN cannot be directly entered into Mathomatic. 11/30/09 - Added shell scripts "t" and "tests/t" to easily test Mathomatic by typing "./t". 12/2/09 - The fraction command now factors out the GCD of rational coefficients like the solve command does, so that coefficients in algebraic fractions become integers. The GCD verifying routine was perfected by making it very strict, like it should be.
2010-08-30 04:48:40 +02:00
MASTER_SITES= http://mathomatic.org/
EXTRACT_SUFX= .tar.bz2
2005-09-10 20:16:04 +02:00
MAINTAINER= minskim@NetBSD.org
2007-04-23 00:45:07 +02:00
HOMEPAGE= http://www.mathomatic.org/
COMMENT= Small portable symbolic math program
Update to Mathomatic 15.2.0 CHANGES MADE TO MATHOMATIC 15.2.0 TO BRING IT UP TO THE NEXT VERSION: All makefiles were improved. Library test/example program is renamed to "testmain". Package maintainers please take note: support for the DESTDIR environment variable was added to the makefiles; for proper operation when packaging version 15.2.1 or higher, please remove any patches for missing DESTDIR support. m4 Mathomatic should work now when included in the Mathomatic package (make m4install). Thank you for packaging Mathomatic! If I did anything wrong, please let me know. 8/26/10 - Added the -e option, which processes mathematical expressions and Mathomatic commands instead of input files on the shell command line. For example, entering "mathomatic -eq 2+3" gives "answer = 5". This functionality has been requested many times by Mathomatic command line users. A complete example: CHANGES MADE TO MATHOMATIC 15.1.6 TO BRING IT UP TO THE NEXT VERSION: Minor improvements were made to the user documentation. 8/22/10 - Removed "Complex number roots approximated" warning message, since this happens often. Capitalized E, I, PI, and Pi are now accepted as the universal constants e, i, and pi, without needing to enter "set no case". This allows Mathomatic to easily accept Mathematica style expression input. m4 Mathomatic now additionally accepts Mathematica style capitalized function input. matho and rmath now display elapsed, CPU, and system times in seconds upon exit. 8/23/10 - Fixed #equation-number entry at the main prompt to always work and allow an expression or equation following on the same line to be entered at that equation space. For example: "#10 y=1/x" will work now; previously only worked if equation space number 10 was previously allocated and used. The way it works is: all equation spaces up to and including number 10 are allocated, if not already allocated, upon entry of "#10". Equations spaces are allocated with the memory allocator malloc(3). CHANGES MADE TO MATHOMATIC 15.1.5 TO BRING IT UP TO THE NEXT VERSION: 7/26/10 - Disabled ncurses call for auto-color detection when CYGWIN is defined while compiling the source code, due to a reported problem of readline failing with ncurses in Cygwin. 7/28/10 - Disabled readline history save file for the Cygwin port, because it is a filename that starts with a period. 7/31/10 - Added "set fractions_display" option, to allow disabling the automatic conversion of fractions like .5 to 1/2 for display. Developer requested and useful in the symbolic math library, when numerical fraction output isn't wanted. 8/01/10 - Fixed a memory leak when ignoring the output string in the symbolic math library. 8/04/10 - Preserve overflowed powers like 2^2222 rather than aborting with an error message. Allow simplification of math like 2*2^2222 and 2/2^2222. 8/08/10 - matho-primes runs twice as fast with the -ffast-math gcc compilation option, which is now enabled by default. Don't try -ffast-math with the main Mathomatic program though, because then Mathomatic won't work properly. CHANGES MADE TO MATHOMATIC 15.1.4 TO BRING IT UP TO THE NEXT VERSION: Many minor tweaks and improvements. 7/03/10 - Makefiles and compile scripts were corrected and enhanced per http://www.gnu.org/prep/standards/ 7/06/10 - Changed all "#if true" and "#if false" conditional commenting to "#if 1" and "#if 0" in the C source code, thanks to Min Sik Kim of NetBSD pkgsrc. CHANGES MADE TO MATHOMATIC 15.1.3 TO BRING IT UP TO THE NEXT VERSION: All of the Unix man pages and user manuals for Mathomatic were fixed. The compare and "solve verify" commands now simplify more thoroughly with "repeat simplify" for better expression equality determination. 6/17/10 - Greatly improved file operation error reporting by using the perror(3) function. 6/18/10 - Fixed categories in "icons/mathomatic.desktop"; Mathomatic now goes under valid categories, mainly Education. CHANGES MADE TO MATHOMATIC 15.1.2 TO BRING IT UP TO THE NEXT VERSION: 6/6/10 - I made mistakes in the improvement to the simplify command of version 15.1.2, the original working simplify logic of version 15.1.1 is now restored, sorry. CHANGES MADE TO MATHOMATIC 15.1.1 TO BRING IT UP TO THE NEXT VERSION: A general cleanup was done. A small improvement was made to the final result of the simplify and fraction commands. Showing intermediate results in the calculate, sum, and product commands is now done with "set debug 1". 5/28/10 - Added "tests/collatz.in", the Collatz conjecture as an automatically computable equation. CHANGES MADE TO MATHOMATIC 15.1.0 TO BRING IT UP TO THE NEXT VERSION: Code and documentation cleanup. 5/21/10 - Added "primes/matho-sum", a utility that sums its command line arguments or standard input. Use "matho-primes 0 2000000 | matho-sum" to find the sum of all primes less than 2,000,000. Solves Project Euler problem #10: http://projecteuler.net/index.php?section=problems&id=10 5/23/10 - Primes (') are allowed in variable names now, if not using the symbolic math library, so that the derivative, integrate, and nintegrate commands can change the dependent variable to y', y'', etc. This can be turned on in the symbolic math library by the command "set special_variable_characters='". Non-alphanumeric characters in variable names are now converted to underline characters (_) when exporting to a programming language or to a different program. CHANGES MADE TO MATHOMATIC 15.0.8 TO BRING IT UP TO THE NEXT VERSION: 5/10/10 - Added "help constants" command. 5/11/10 - Integer variables are now specified by using a variable name that starts with "integer", like "integer1", "integer_x", etc. Currently only the modulus operator "%" checks for integer variables, to help with simplification. 5/12/10 - Corrected the output string type of the symbolic math library API. It was erroneously declared as type "const", possibly causing a memory leak. 5/13/10 - Moved and adapted "makefile.lib" to "lib/makefile", so the symbolic math library build is isolated. Previously "make clean" was required between different builds. All makefiles require GNU make now. CHANGES MADE TO MATHOMATIC 15.0.7 TO BRING IT UP TO THE NEXT VERSION: 4/26/10 - Allow "make pdf" to generate PDF documentation from the HTML documentation with htmldoc. Please read the comments in the makefile for all available options. 4/29/10 - For every makefile, CFLAGS has been modified to include OPTFLAGS as required by the Fedora Linux build system, and OPTFLAGS defaults to the optional gcc specific flags like optimization. In the symbolic math library, made available the equation number of the result of calling the API, if also stored in an equation space. The result equation number is stored in the global "result_en". Useful if you want to know where the result was stored, to act on it with further commands. CHANGES MADE TO MATHOMATIC 15.0.6 TO BRING IT UP TO THE NEXT VERSION: Corrections and improvements to the documentation were made. 4/3/10 - Vastly improved the "factor number" user interface, now factors integer expressions like 2^32-1. "factor number" is disabled in library mode. 4/13/10 - The real and imaginary commands no longer fail when the expression is not complex, just a warning is given. 4/14/10 - Changed normal display of "-1*" to "-", for prettier 2D expression output, so things like "-a" display properly, not as "-1*a". CHANGES MADE TO MATHOMATIC 15.0.5: 1/28/10 - Added a Python utility called "primorial" to the Prime Number Tools install that multiplies together the results of matho-primes, displaying the primorials of the integers given on the command line. 3/18/10 - Changed author email address to "gesslein@linux.com". 3/23/10 - Catch SIGHUP and SIGTERM signals for proper termination of the Mathomatic program; readline was messing up when Mathomatic was terminated by closing the shell window. The plot command now always plots expressions with grid marks displayed for reference. CHANGES MADE TO MATHOMATIC 15.0.4: 1/21/10 - In the makefile, changed the HTML man page generator back to rman because groff HTML output looks really bad and rman allows linking to other man pages. groff is no longer used. 1/24/10 - Fixed "make m4install", the installed rmath and matho programs weren't working. 1/27/10 - Added GNU LGPL license notices to every C source file with a copyright notice, for proper protections. CHANGES MADE TO MATHOMATIC 15.0.3: 1/9/10 - Fixed a problem only in the version 15.0.3 makefile, where it didn't respect the CC environment variable set by the user, instead it always used "gcc" as the C compiler. CHANGES MADE TO MATHOMATIC 15.0.2: 12/27/09 - Moved get_screen_size() from main.c to am.c because it is used in the library when compile-time options UNIX or CYGWIN are defined. Thanks to Cygwin port maintainer Reini Urban for noticing and fixing this problem. Defining UNIX or CYGWIN in library mode is not recommended. 12/31/09 - Added code to allow any command to be preceded by "repeat", which sets the repeat flag for the following command. Most commands ignore the repeat flag. 1/1/10 - Ported divide and roots commands to be repeatable. Also repeatable are the calculate and eliminate commands. 1/2/10 - Allow Taylor series computation even if the specified differentiation variable is not found in the expression, giving a warning. Ported simplify command to be a repeatable full simplify; that is, typing "repeat simplify" repeatedly runs the simplify command until the result stabilizes to the smallest size expression. 1/7/10 - Thanks to pretty C code submitted by Simon Geard, the code and variables commands have been made much more readable. 1/8/10 - Made Mathomatic easier to compile under Solaris, thanks to Michael Pogue of Sun. Fixed failure to compile under BSD Unix when compiling with readline support. CHANGES MADE TO MATHOMATIC 15.0.1: 12/19/09 - The last few versions fix the ugliness caused by the GCD factoring change made on 6/22/09. Today's change factors out the numerical GCD of rational coefficients as needed to simplify. Most simplification results should be beautiful and the simplest possible again now, without the misleading observed magnitude caused by always factoring out the GCD, which was why the change of 6/22/09 was made. CHANGES MADE TO MATHOMATIC 15.0.0: 12/12/09 - Fixed a problem with the -q (quiet mode) option being ignored if the session options were ever saved with the "set save" command. 12/13/09 - Added code to allow Mathomatic output to be redirected by default. Fixed the derivative command to be successful even when the result is 0, when compiled as a library. 12/14/09 - Added ability to log symbolic math library results, and made command behavior more consistent in the library by always returning the final result string. 12/16/09 - The factor command now factors more by factoring out the GCD of rational coefficients. CHANGES MADE TO MATHOMATIC 14.6.3 TO BRING IT UP TO 15.0.0: Cleanup and more bug fixes. 11/26/09 - Added detection of the terminal's ANSI color availability, when readline is enabled. 11/28/09 - Added detection of divide by zero and NaN when using the "solve verify" command, for more correct results. Solving now factors out the GCD of rational coefficients, for improved results. The fixes today are from errors solving equations like (2*x/(x - 3)) + 3 = 6/(x - 3) 11/29/09 - Disallow the variable named "nan". NaN cannot be directly entered into Mathomatic. 11/30/09 - Added shell scripts "t" and "tests/t" to easily test Mathomatic by typing "./t". 12/2/09 - The fraction command now factors out the GCD of rational coefficients like the solve command does, so that coefficients in algebraic fractions become integers. The GCD verifying routine was perfected by making it very strict, like it should be.
2010-08-30 04:48:40 +02:00
LICENSE= gnu-lgpl-v2.1
PKG_INSTALLATION_TYPES= overwrite pkgviews
PKG_DESTDIR_SUPPORT= user-destdir
NO_CONFIGURE= yes
2006-09-09 04:41:53 +02:00
MAKE_FILE= makefile
Update to Mathomatic 15.2.0 CHANGES MADE TO MATHOMATIC 15.2.0 TO BRING IT UP TO THE NEXT VERSION: All makefiles were improved. Library test/example program is renamed to "testmain". Package maintainers please take note: support for the DESTDIR environment variable was added to the makefiles; for proper operation when packaging version 15.2.1 or higher, please remove any patches for missing DESTDIR support. m4 Mathomatic should work now when included in the Mathomatic package (make m4install). Thank you for packaging Mathomatic! If I did anything wrong, please let me know. 8/26/10 - Added the -e option, which processes mathematical expressions and Mathomatic commands instead of input files on the shell command line. For example, entering "mathomatic -eq 2+3" gives "answer = 5". This functionality has been requested many times by Mathomatic command line users. A complete example: CHANGES MADE TO MATHOMATIC 15.1.6 TO BRING IT UP TO THE NEXT VERSION: Minor improvements were made to the user documentation. 8/22/10 - Removed "Complex number roots approximated" warning message, since this happens often. Capitalized E, I, PI, and Pi are now accepted as the universal constants e, i, and pi, without needing to enter "set no case". This allows Mathomatic to easily accept Mathematica style expression input. m4 Mathomatic now additionally accepts Mathematica style capitalized function input. matho and rmath now display elapsed, CPU, and system times in seconds upon exit. 8/23/10 - Fixed #equation-number entry at the main prompt to always work and allow an expression or equation following on the same line to be entered at that equation space. For example: "#10 y=1/x" will work now; previously only worked if equation space number 10 was previously allocated and used. The way it works is: all equation spaces up to and including number 10 are allocated, if not already allocated, upon entry of "#10". Equations spaces are allocated with the memory allocator malloc(3). CHANGES MADE TO MATHOMATIC 15.1.5 TO BRING IT UP TO THE NEXT VERSION: 7/26/10 - Disabled ncurses call for auto-color detection when CYGWIN is defined while compiling the source code, due to a reported problem of readline failing with ncurses in Cygwin. 7/28/10 - Disabled readline history save file for the Cygwin port, because it is a filename that starts with a period. 7/31/10 - Added "set fractions_display" option, to allow disabling the automatic conversion of fractions like .5 to 1/2 for display. Developer requested and useful in the symbolic math library, when numerical fraction output isn't wanted. 8/01/10 - Fixed a memory leak when ignoring the output string in the symbolic math library. 8/04/10 - Preserve overflowed powers like 2^2222 rather than aborting with an error message. Allow simplification of math like 2*2^2222 and 2/2^2222. 8/08/10 - matho-primes runs twice as fast with the -ffast-math gcc compilation option, which is now enabled by default. Don't try -ffast-math with the main Mathomatic program though, because then Mathomatic won't work properly. CHANGES MADE TO MATHOMATIC 15.1.4 TO BRING IT UP TO THE NEXT VERSION: Many minor tweaks and improvements. 7/03/10 - Makefiles and compile scripts were corrected and enhanced per http://www.gnu.org/prep/standards/ 7/06/10 - Changed all "#if true" and "#if false" conditional commenting to "#if 1" and "#if 0" in the C source code, thanks to Min Sik Kim of NetBSD pkgsrc. CHANGES MADE TO MATHOMATIC 15.1.3 TO BRING IT UP TO THE NEXT VERSION: All of the Unix man pages and user manuals for Mathomatic were fixed. The compare and "solve verify" commands now simplify more thoroughly with "repeat simplify" for better expression equality determination. 6/17/10 - Greatly improved file operation error reporting by using the perror(3) function. 6/18/10 - Fixed categories in "icons/mathomatic.desktop"; Mathomatic now goes under valid categories, mainly Education. CHANGES MADE TO MATHOMATIC 15.1.2 TO BRING IT UP TO THE NEXT VERSION: 6/6/10 - I made mistakes in the improvement to the simplify command of version 15.1.2, the original working simplify logic of version 15.1.1 is now restored, sorry. CHANGES MADE TO MATHOMATIC 15.1.1 TO BRING IT UP TO THE NEXT VERSION: A general cleanup was done. A small improvement was made to the final result of the simplify and fraction commands. Showing intermediate results in the calculate, sum, and product commands is now done with "set debug 1". 5/28/10 - Added "tests/collatz.in", the Collatz conjecture as an automatically computable equation. CHANGES MADE TO MATHOMATIC 15.1.0 TO BRING IT UP TO THE NEXT VERSION: Code and documentation cleanup. 5/21/10 - Added "primes/matho-sum", a utility that sums its command line arguments or standard input. Use "matho-primes 0 2000000 | matho-sum" to find the sum of all primes less than 2,000,000. Solves Project Euler problem #10: http://projecteuler.net/index.php?section=problems&id=10 5/23/10 - Primes (') are allowed in variable names now, if not using the symbolic math library, so that the derivative, integrate, and nintegrate commands can change the dependent variable to y', y'', etc. This can be turned on in the symbolic math library by the command "set special_variable_characters='". Non-alphanumeric characters in variable names are now converted to underline characters (_) when exporting to a programming language or to a different program. CHANGES MADE TO MATHOMATIC 15.0.8 TO BRING IT UP TO THE NEXT VERSION: 5/10/10 - Added "help constants" command. 5/11/10 - Integer variables are now specified by using a variable name that starts with "integer", like "integer1", "integer_x", etc. Currently only the modulus operator "%" checks for integer variables, to help with simplification. 5/12/10 - Corrected the output string type of the symbolic math library API. It was erroneously declared as type "const", possibly causing a memory leak. 5/13/10 - Moved and adapted "makefile.lib" to "lib/makefile", so the symbolic math library build is isolated. Previously "make clean" was required between different builds. All makefiles require GNU make now. CHANGES MADE TO MATHOMATIC 15.0.7 TO BRING IT UP TO THE NEXT VERSION: 4/26/10 - Allow "make pdf" to generate PDF documentation from the HTML documentation with htmldoc. Please read the comments in the makefile for all available options. 4/29/10 - For every makefile, CFLAGS has been modified to include OPTFLAGS as required by the Fedora Linux build system, and OPTFLAGS defaults to the optional gcc specific flags like optimization. In the symbolic math library, made available the equation number of the result of calling the API, if also stored in an equation space. The result equation number is stored in the global "result_en". Useful if you want to know where the result was stored, to act on it with further commands. CHANGES MADE TO MATHOMATIC 15.0.6 TO BRING IT UP TO THE NEXT VERSION: Corrections and improvements to the documentation were made. 4/3/10 - Vastly improved the "factor number" user interface, now factors integer expressions like 2^32-1. "factor number" is disabled in library mode. 4/13/10 - The real and imaginary commands no longer fail when the expression is not complex, just a warning is given. 4/14/10 - Changed normal display of "-1*" to "-", for prettier 2D expression output, so things like "-a" display properly, not as "-1*a". CHANGES MADE TO MATHOMATIC 15.0.5: 1/28/10 - Added a Python utility called "primorial" to the Prime Number Tools install that multiplies together the results of matho-primes, displaying the primorials of the integers given on the command line. 3/18/10 - Changed author email address to "gesslein@linux.com". 3/23/10 - Catch SIGHUP and SIGTERM signals for proper termination of the Mathomatic program; readline was messing up when Mathomatic was terminated by closing the shell window. The plot command now always plots expressions with grid marks displayed for reference. CHANGES MADE TO MATHOMATIC 15.0.4: 1/21/10 - In the makefile, changed the HTML man page generator back to rman because groff HTML output looks really bad and rman allows linking to other man pages. groff is no longer used. 1/24/10 - Fixed "make m4install", the installed rmath and matho programs weren't working. 1/27/10 - Added GNU LGPL license notices to every C source file with a copyright notice, for proper protections. CHANGES MADE TO MATHOMATIC 15.0.3: 1/9/10 - Fixed a problem only in the version 15.0.3 makefile, where it didn't respect the CC environment variable set by the user, instead it always used "gcc" as the C compiler. CHANGES MADE TO MATHOMATIC 15.0.2: 12/27/09 - Moved get_screen_size() from main.c to am.c because it is used in the library when compile-time options UNIX or CYGWIN are defined. Thanks to Cygwin port maintainer Reini Urban for noticing and fixing this problem. Defining UNIX or CYGWIN in library mode is not recommended. 12/31/09 - Added code to allow any command to be preceded by "repeat", which sets the repeat flag for the following command. Most commands ignore the repeat flag. 1/1/10 - Ported divide and roots commands to be repeatable. Also repeatable are the calculate and eliminate commands. 1/2/10 - Allow Taylor series computation even if the specified differentiation variable is not found in the expression, giving a warning. Ported simplify command to be a repeatable full simplify; that is, typing "repeat simplify" repeatedly runs the simplify command until the result stabilizes to the smallest size expression. 1/7/10 - Thanks to pretty C code submitted by Simon Geard, the code and variables commands have been made much more readable. 1/8/10 - Made Mathomatic easier to compile under Solaris, thanks to Michael Pogue of Sun. Fixed failure to compile under BSD Unix when compiling with readline support. CHANGES MADE TO MATHOMATIC 15.0.1: 12/19/09 - The last few versions fix the ugliness caused by the GCD factoring change made on 6/22/09. Today's change factors out the numerical GCD of rational coefficients as needed to simplify. Most simplification results should be beautiful and the simplest possible again now, without the misleading observed magnitude caused by always factoring out the GCD, which was why the change of 6/22/09 was made. CHANGES MADE TO MATHOMATIC 15.0.0: 12/12/09 - Fixed a problem with the -q (quiet mode) option being ignored if the session options were ever saved with the "set save" command. 12/13/09 - Added code to allow Mathomatic output to be redirected by default. Fixed the derivative command to be successful even when the result is 0, when compiled as a library. 12/14/09 - Added ability to log symbolic math library results, and made command behavior more consistent in the library by always returning the final result string. 12/16/09 - The factor command now factors more by factoring out the GCD of rational coefficients. CHANGES MADE TO MATHOMATIC 14.6.3 TO BRING IT UP TO 15.0.0: Cleanup and more bug fixes. 11/26/09 - Added detection of the terminal's ANSI color availability, when readline is enabled. 11/28/09 - Added detection of divide by zero and NaN when using the "solve verify" command, for more correct results. Solving now factors out the GCD of rational coefficients, for improved results. The fixes today are from errors solving equations like (2*x/(x - 3)) + 3 = 6/(x - 3) 11/29/09 - Disallow the variable named "nan". NaN cannot be directly entered into Mathomatic. 11/30/09 - Added shell scripts "t" and "tests/t" to easily test Mathomatic by typing "./t". 12/2/09 - The fraction command now factors out the GCD of rational coefficients like the solve command does, so that coefficients in algebraic fractions become integers. The GCD verifying routine was perfected by making it very strict, like it should be.
2010-08-30 04:48:40 +02:00
USE_TOOLS+= gmake
Update Mathomatic to version 15.6.0. Changes in Mathomatic version 15.6.0: ------------------------------------ Many tweaks and corrections to simplification and polynomial operations were made. Created m4 Mathomatic input file "tests/trig". Lists all trig and hypertrig functions, allowing testing of their simplification and manipulation. Sped up polynomial operations to be another 30 times faster in some cases. Finished and cleaned up the polynomial factoring and division C code. Thanks again to Kingsley G. Morse Jr. for showing me this needed to be done. The "simplify quick" command was changed to not combine unlike denominators, making it much more useful, doing better simplification than any other simplify option sometimes. The tally command now returns the ending total and sets it as the current equation. Fixed an old bug just discovered today where expressions like (x - y)*(x^99 - y^99) were being factored into something huge with the simplify and fraction commands, which are the only commands that do polynomial factoring. Improved coloring scheme: all prompt and normal text is now the terminal emulator's default color for text (usually uncolored). Expressions remain colored if color mode is enabled. Thanks to Carl U. Grayser for the good idea. Improved the fraction command by factoring polynomials first. Specifying the "numerator" and "denominator" options together will make the fraction command return with failure if the result is not a fraction, otherwise the entire fraction is returned. Changes in Mathomatic version 15.5.3: ------------------------------------ Simplify expressions with positive bases like 16^(x/2) and (2^m)^n by default; previously only simplified these with the "simplify symbolic" command. The exit status of Mathomatic now shows any errors when run with the -e option. So if a command fails, it exits to the OS with the exit status 1. Exit status is 0 if everything went OK. Also works without the -e option, when files are specified on the shell command line. An error will abort the script, returning you to the operating system with an exit status of 1. Changed makefile to allow installing m4 Mathomatic without installing the documentation. Use "sudo make bininstall matho-rmath-install" to install m4 Mathomatic executables and man pages. Then "sudo make docinstall" installs all documentation. The rmath man page math function and constant lists have been corrected and the rmath man page has been added to the main user documentation. Output of universal constants is now prettier when displaying. No more i#, e#, and pi#, they are displayed as they are entered: i, e, and pi. HTML mode displays the small Greek letter pi for pi. The nintegrate command now works with complex numbers and trigonometry, and does not change the current equation to the result. Link the man page rmath.1 to matho.1 when installing, so that every executable has a man page. Added "numerator" and "denominator" options to the fraction command, which returns only the numerator or denominator after making sure the expression is a simple algebraic fraction. Autocalc now deletes only the previous autocalc when autocalc is used. It was deleting all autocalc results except for the current one every time, preventing copying. Improved simplification of expressions like (x + (2^(1/2)))^{3,4,5,6}. It broke a while back when factor_times() constant factoring was improved. The fix uses factor_times() less, preserving reduced surds. Saving "plot_prefix" with the "set save" command was not escaping semicolons, so they were disappearing from the prefix. Fixed now. Changes in Mathomatic version 15.5.2: ------------------------------------ Renamed the "factorial" directory to "examples". Fixed entering negative odd roots like (-32)^(1/3) to not approximate, instead simplifying to -2*4^(1/3). So all surds are preserved, now. Added man pages for the Mathomatic Symbolic Math Library functions. Allow building a PDF book of all Mathomatic man pages. Simplify command simplification sped up even more, by putting algebraic fraction reduction in the right place and not overusing it. Responsiveness has greatly improved for large expressions. Thanks go to Kingsley G. Morse Jr. for help with this and for filing a bug report. The simplify command functionality was improved. It was fixed to not mess up with unwanted fractional coefficients. Changes in Mathomatic version 15.5.1: ------------------------------------ Many minor cleanups and corrections were made. Renamed Mathomatic User's Manual to Official Mathomatic User Guide. Calculate command now outputs fewer newlines. Not so much blank space. Allow equation-number-ranges on the plot command line. For example, "plot all" works now, to plot all stored equations and expressions at once, for easy comparison. Changes in Mathomatic version 15.5.0: ------------------------------------ Fixed result of (constant % inf) to equal constant. Restored explicitly linking with ncurses library when compiled with readline, because Red Hat Linux wrongly requires this. There is no way to know ahead of time whether this is needed, so remove the "-lncurses" from the makefile if there is a problem linking. Upgraded set option "fractions_display_mode" to display fractions as mixed fractions when possible, when set to mode 2. A mixed fraction is possible when the numerator of a simple fraction is greater than the denominator, like 9/4, which displays as (2+(1/4)) in mixed fraction display mode 2. Mode 1 is the default, which functions as before, displaying 2.25 as the simple fraction 9/4. To display mixed fractions only on command, just type "display mixed" to display the current expression with mixed fractions output that one time. Autocalc (used when typing a numerical only expression at the main prompt) now keeps the result until next time autocalc is used, so that it can be acted on further by Mathomatic commands, if desired. All previous autocalc results are erased every time autocalc is used. This provides much better calculator functionality for Mathomatic and improves ease-of-use. Use HTML infinity symbol (∞) for infinities in HTML output mode. Allow solid fraction bar display in HTML output mode by using "–". Previously the ASCII dash character "-" was used, making a dashed line that separated the numerator and denominator of fractions. Now the line should be solid in HTML output mode. Improved divide command for numerical division. Added mixed fractions and cleaned up output. Ported matho-primes to MS-Windows and included it in the Windows version on my website: "http://mathomatic.org/winam2.zip". The fraction command is now repeatable by preceding it with "repeat". This repeatedly runs it until the smallest expression is achieved. Simplification was sped up, especially with "simplify quick", therefore differentiating and the Taylor command are faster. Removed the requirement for the Unix "time" command with m4 Mathomatic. Allow array variable refs like a[2] or a[1][2] when generating C code. Just "set special []" to allow straight brackets in variable names. Another ease-of-use enhancement was implemented, making it possible to use "#equation-number" anywhere in any expression, it will insert the expression at that equation number. This is an improvement that should have been done long ago. However, don't expect it to work with the plot command, "plot #1" does not work because the argument to plot is a string and/or the current equation. For example, typing things like "y=#1^2" is a convenient way to raise the expression in equation space number 1 to the power of 2 and set it equal to y, or whatever you wish. Changes in Mathomatic version 15.4.4: ------------------------------------ Many minor but obnoxious bugs were fixed. Fixed result of constant modulo 0 (e.g. 9 % 0) and infinity modulo constant (e.g. inf % 9) to be NaN. Disabled shelling out and the edit command only in m4 Mathomatic. The terminal hung when shelling out or editing with an m4 front-end. Plotting still works and pagination is working now for m4 Mathomatic. Cleaned up tests/quartic.in, it now works without m4 Mathomatic, and is a single formula to solve most fourth degree polynomial equations. Created a nice man page for rmath and matho (rmath.1). Changes in Mathomatic version 15.4.3: ------------------------------------ Fixed negate priority to be the same as TIMES/DIVIDE like Maxima (yay!). So now entering -x^2 is meaningful. Previously negate was the highest priority (high precedence) operator. Entering -2^2 now results in -4 instead of 4, as in most other mathematics programs (except for pure calculators like bc). Flush standard output before reading a line of input from the user when not using readline, so that the MinGW version works with mintty. Added a new "for" command, for plugging in sequential values into a variable in the current expression and displaying the results. The syntax is the same as the sum and product commands. Changes in Mathomatic version 15.4.1: ------------------------------------ Upgraded the plot command towards always giving gnuplot a proper plot command, no matter what the user input is. The plot command now automatically renames the variable in a single variable expression to the x variable, so plotting will always succeed. Removed Python script "misc/mp"; Couldn't get mpmath to work properly for all input. Improved results of the fraction command. Now saving readline history in $HOME/mathomatic_history when compiled for CygWin. Now additionally searching for "mathomatic.rc" in $HOME when compiled for CygWin. Ported matho-pascal and matho-primes to double floats if USE_DOUBLES is defined, for systems that don't support long double floats. Changes in Mathomatic version 15.4.0: ------------------------------------ Added "compare approximate" command option, use of which is more likely to result in a successful comparison. Runs the approximate command on both expressions before comparing, if needed. The variables command syntax was upgraded to be the same as the code command. Added code to delete identities in the optimize command. When identical equations were optimized, identities would result. These are now removed. Fixed incorrect syntax in the menu files in menu directory. Added "tests/quartic.in". At last, a working set of equations for calculating the four solutions of any quartic equation, similar to "tests/cubic.in". Fixed parser routine to give a helpful error message when a cursor or function key string is encountered. Escape, carriage return, and form-feed are ignored now. Changes in Mathomatic version 15.3.7: ------------------------------------ Fixed the modulus operator (%) to always evaluate to an integer when both arguments are integer. 7921%14 was giving 11.000000000001, now gives exactly 11. Equation number ranges for commands may include unallocated equation spaces now, allowing entry of any reasonable range. Changes in Mathomatic version 15.3.6: ------------------------------------ Many minor fixes for consistency and helpfulness were made. Cleaned up "factor numbers" command for consistency in operation and to work as documented. Warn when substituting a non-integer expression into an integer variable. Added m4/degrees.m4, this can be read into rmath with "rmath degrees.m4" to use degree units instead of radians for trig functions. "sudo make m4install-degrees" installs degree mode as the default for matho and rmath by appending m4/degrees.m4 to m4/functions.m4. Allow input of #equation-number as the LHS or RHS of any equation. It is replaced with the expression or RHS at the specified equation-number. Note that #equation-number is also the current equation selector, so entering it as the LHS at the main prompt will function differently. Simplify (integer % 1) and the like to 0. Generalized to instantly simplify to 0 the following: (integer_expression % +/-unit_fraction). Changes in Mathomatic version 15.3.4: ------------------------------------ Fixed an error reporting bug in the solve command. There was the possibility of spewed space characters with improper input. Added code so that solving for 0^2 or variable^2 will properly square both sides of an equation. Solving for variable^2 will isolate the square root of the largest expression containing that variable, and then square both sides of the equation. Works for any power and variable with any equation with roots. Changes in Mathomatic version 15.3.3: ------------------------------------ Fixed -e option to be more like entering what follows into the main prompt; That is, the autosolve option is left on and errors do not abort. "set finance" option now groups output with thousands' grouping characters if the locale information indicates any. For example: 2,000,000.00 Changes in Mathomatic version 15.3.2: ------------------------------------ Added "help options" command which lists invocation options (like -h). Entering "nan" now gives a warning, instead of an error, so that expressions containing NaN can be read back in without aborting. Added "-c count" option to matho-primes, optionally limiting the number of lines of primes that are output to "count" lines. Fixed an old, important bug in the Mathomatic solve routine, where solve was failing on some easy to solve equations indeterminately, because of incorrect infinite loop detection code. Solving should work perfectly now. This problem was discovered today with the input: "a=a+b" "a" "b". Changes in Mathomatic version 15.3.1: ------------------------------------ Improved the help command, allowing multiple help topics on the help command line. Improved upon "misc/roots.c", the automatic polynomial root finder. Increased the maximum number of equation spaces from 100 to 200. They do not consume memory unless they are used. Solving things like 0=(x+1)^15+x for x exited the solve routine without grace. This problem is now fixed for all solve requests that aborted with error. When using the symbolic math library, the display command now outputs all specified equation spaces in fraction format and returns the last equation space listed as a result. Before it was just a crippled list command with a little simplification that didn't output anything. Changes in Mathomatic version 15.3.0: ------------------------------------ Changed -u option to also echo line input, so that m4 Mathomatic is easier to use. X-Windows icon for the Mathomatic entry within desktop menu systems. The repeat command can now be shortened to 4 characters, like any other command. Capitalized E, I, and PI are now no longer parsed as universal constants. Entering E, I, or PI will now result in the general variables E, I, and PI, unless "set no case" is previously entered. This change undoes version 15.2.0 Mathematica compatibility, due to kind user feedback. Entering e, i, or pi still gives the universal constants e#, i#, and pi#. Removed "set negate_highest_precedence" option. This was done for compatibility and so that less parentheses are displayed within expressions. Polynomials should display very nicely now, powers like "x^2", "y^3", and "x^y" are not parenthesized unless need be. Added "list hexadecimal" command option, which displays expressions exactly as stored internally in hexadecimal. No precision is lost, this is because the floating point values are not converted to decimal. Error reporting was improved. Changes in Mathomatic version 15.2.2: ------------------------------------ Added "set plot_prefix" option, which allows custom plot functionality. Changes in Mathomatic version 15.2.1: ------------------------------------ Added the -e option, which processes mathematical expressions and Mathomatic commands instead of input files on the shell command line. Improved results of solving for zero. Results should have reduced integer coefficients, by factoring out the GCD of rational coefficients.
2011-05-01 01:28:56 +02:00
INSTALL_ENV+= prefix=$(PREFIX) mandir=$(DESTDIR)$(PREFIX)/$(PKGMANDIR)
CFLAGS.SunOS+= -DSOLARIS
Update to Mathomatic 15.2.0 CHANGES MADE TO MATHOMATIC 15.2.0 TO BRING IT UP TO THE NEXT VERSION: All makefiles were improved. Library test/example program is renamed to "testmain". Package maintainers please take note: support for the DESTDIR environment variable was added to the makefiles; for proper operation when packaging version 15.2.1 or higher, please remove any patches for missing DESTDIR support. m4 Mathomatic should work now when included in the Mathomatic package (make m4install). Thank you for packaging Mathomatic! If I did anything wrong, please let me know. 8/26/10 - Added the -e option, which processes mathematical expressions and Mathomatic commands instead of input files on the shell command line. For example, entering "mathomatic -eq 2+3" gives "answer = 5". This functionality has been requested many times by Mathomatic command line users. A complete example: CHANGES MADE TO MATHOMATIC 15.1.6 TO BRING IT UP TO THE NEXT VERSION: Minor improvements were made to the user documentation. 8/22/10 - Removed "Complex number roots approximated" warning message, since this happens often. Capitalized E, I, PI, and Pi are now accepted as the universal constants e, i, and pi, without needing to enter "set no case". This allows Mathomatic to easily accept Mathematica style expression input. m4 Mathomatic now additionally accepts Mathematica style capitalized function input. matho and rmath now display elapsed, CPU, and system times in seconds upon exit. 8/23/10 - Fixed #equation-number entry at the main prompt to always work and allow an expression or equation following on the same line to be entered at that equation space. For example: "#10 y=1/x" will work now; previously only worked if equation space number 10 was previously allocated and used. The way it works is: all equation spaces up to and including number 10 are allocated, if not already allocated, upon entry of "#10". Equations spaces are allocated with the memory allocator malloc(3). CHANGES MADE TO MATHOMATIC 15.1.5 TO BRING IT UP TO THE NEXT VERSION: 7/26/10 - Disabled ncurses call for auto-color detection when CYGWIN is defined while compiling the source code, due to a reported problem of readline failing with ncurses in Cygwin. 7/28/10 - Disabled readline history save file for the Cygwin port, because it is a filename that starts with a period. 7/31/10 - Added "set fractions_display" option, to allow disabling the automatic conversion of fractions like .5 to 1/2 for display. Developer requested and useful in the symbolic math library, when numerical fraction output isn't wanted. 8/01/10 - Fixed a memory leak when ignoring the output string in the symbolic math library. 8/04/10 - Preserve overflowed powers like 2^2222 rather than aborting with an error message. Allow simplification of math like 2*2^2222 and 2/2^2222. 8/08/10 - matho-primes runs twice as fast with the -ffast-math gcc compilation option, which is now enabled by default. Don't try -ffast-math with the main Mathomatic program though, because then Mathomatic won't work properly. CHANGES MADE TO MATHOMATIC 15.1.4 TO BRING IT UP TO THE NEXT VERSION: Many minor tweaks and improvements. 7/03/10 - Makefiles and compile scripts were corrected and enhanced per http://www.gnu.org/prep/standards/ 7/06/10 - Changed all "#if true" and "#if false" conditional commenting to "#if 1" and "#if 0" in the C source code, thanks to Min Sik Kim of NetBSD pkgsrc. CHANGES MADE TO MATHOMATIC 15.1.3 TO BRING IT UP TO THE NEXT VERSION: All of the Unix man pages and user manuals for Mathomatic were fixed. The compare and "solve verify" commands now simplify more thoroughly with "repeat simplify" for better expression equality determination. 6/17/10 - Greatly improved file operation error reporting by using the perror(3) function. 6/18/10 - Fixed categories in "icons/mathomatic.desktop"; Mathomatic now goes under valid categories, mainly Education. CHANGES MADE TO MATHOMATIC 15.1.2 TO BRING IT UP TO THE NEXT VERSION: 6/6/10 - I made mistakes in the improvement to the simplify command of version 15.1.2, the original working simplify logic of version 15.1.1 is now restored, sorry. CHANGES MADE TO MATHOMATIC 15.1.1 TO BRING IT UP TO THE NEXT VERSION: A general cleanup was done. A small improvement was made to the final result of the simplify and fraction commands. Showing intermediate results in the calculate, sum, and product commands is now done with "set debug 1". 5/28/10 - Added "tests/collatz.in", the Collatz conjecture as an automatically computable equation. CHANGES MADE TO MATHOMATIC 15.1.0 TO BRING IT UP TO THE NEXT VERSION: Code and documentation cleanup. 5/21/10 - Added "primes/matho-sum", a utility that sums its command line arguments or standard input. Use "matho-primes 0 2000000 | matho-sum" to find the sum of all primes less than 2,000,000. Solves Project Euler problem #10: http://projecteuler.net/index.php?section=problems&id=10 5/23/10 - Primes (') are allowed in variable names now, if not using the symbolic math library, so that the derivative, integrate, and nintegrate commands can change the dependent variable to y', y'', etc. This can be turned on in the symbolic math library by the command "set special_variable_characters='". Non-alphanumeric characters in variable names are now converted to underline characters (_) when exporting to a programming language or to a different program. CHANGES MADE TO MATHOMATIC 15.0.8 TO BRING IT UP TO THE NEXT VERSION: 5/10/10 - Added "help constants" command. 5/11/10 - Integer variables are now specified by using a variable name that starts with "integer", like "integer1", "integer_x", etc. Currently only the modulus operator "%" checks for integer variables, to help with simplification. 5/12/10 - Corrected the output string type of the symbolic math library API. It was erroneously declared as type "const", possibly causing a memory leak. 5/13/10 - Moved and adapted "makefile.lib" to "lib/makefile", so the symbolic math library build is isolated. Previously "make clean" was required between different builds. All makefiles require GNU make now. CHANGES MADE TO MATHOMATIC 15.0.7 TO BRING IT UP TO THE NEXT VERSION: 4/26/10 - Allow "make pdf" to generate PDF documentation from the HTML documentation with htmldoc. Please read the comments in the makefile for all available options. 4/29/10 - For every makefile, CFLAGS has been modified to include OPTFLAGS as required by the Fedora Linux build system, and OPTFLAGS defaults to the optional gcc specific flags like optimization. In the symbolic math library, made available the equation number of the result of calling the API, if also stored in an equation space. The result equation number is stored in the global "result_en". Useful if you want to know where the result was stored, to act on it with further commands. CHANGES MADE TO MATHOMATIC 15.0.6 TO BRING IT UP TO THE NEXT VERSION: Corrections and improvements to the documentation were made. 4/3/10 - Vastly improved the "factor number" user interface, now factors integer expressions like 2^32-1. "factor number" is disabled in library mode. 4/13/10 - The real and imaginary commands no longer fail when the expression is not complex, just a warning is given. 4/14/10 - Changed normal display of "-1*" to "-", for prettier 2D expression output, so things like "-a" display properly, not as "-1*a". CHANGES MADE TO MATHOMATIC 15.0.5: 1/28/10 - Added a Python utility called "primorial" to the Prime Number Tools install that multiplies together the results of matho-primes, displaying the primorials of the integers given on the command line. 3/18/10 - Changed author email address to "gesslein@linux.com". 3/23/10 - Catch SIGHUP and SIGTERM signals for proper termination of the Mathomatic program; readline was messing up when Mathomatic was terminated by closing the shell window. The plot command now always plots expressions with grid marks displayed for reference. CHANGES MADE TO MATHOMATIC 15.0.4: 1/21/10 - In the makefile, changed the HTML man page generator back to rman because groff HTML output looks really bad and rman allows linking to other man pages. groff is no longer used. 1/24/10 - Fixed "make m4install", the installed rmath and matho programs weren't working. 1/27/10 - Added GNU LGPL license notices to every C source file with a copyright notice, for proper protections. CHANGES MADE TO MATHOMATIC 15.0.3: 1/9/10 - Fixed a problem only in the version 15.0.3 makefile, where it didn't respect the CC environment variable set by the user, instead it always used "gcc" as the C compiler. CHANGES MADE TO MATHOMATIC 15.0.2: 12/27/09 - Moved get_screen_size() from main.c to am.c because it is used in the library when compile-time options UNIX or CYGWIN are defined. Thanks to Cygwin port maintainer Reini Urban for noticing and fixing this problem. Defining UNIX or CYGWIN in library mode is not recommended. 12/31/09 - Added code to allow any command to be preceded by "repeat", which sets the repeat flag for the following command. Most commands ignore the repeat flag. 1/1/10 - Ported divide and roots commands to be repeatable. Also repeatable are the calculate and eliminate commands. 1/2/10 - Allow Taylor series computation even if the specified differentiation variable is not found in the expression, giving a warning. Ported simplify command to be a repeatable full simplify; that is, typing "repeat simplify" repeatedly runs the simplify command until the result stabilizes to the smallest size expression. 1/7/10 - Thanks to pretty C code submitted by Simon Geard, the code and variables commands have been made much more readable. 1/8/10 - Made Mathomatic easier to compile under Solaris, thanks to Michael Pogue of Sun. Fixed failure to compile under BSD Unix when compiling with readline support. CHANGES MADE TO MATHOMATIC 15.0.1: 12/19/09 - The last few versions fix the ugliness caused by the GCD factoring change made on 6/22/09. Today's change factors out the numerical GCD of rational coefficients as needed to simplify. Most simplification results should be beautiful and the simplest possible again now, without the misleading observed magnitude caused by always factoring out the GCD, which was why the change of 6/22/09 was made. CHANGES MADE TO MATHOMATIC 15.0.0: 12/12/09 - Fixed a problem with the -q (quiet mode) option being ignored if the session options were ever saved with the "set save" command. 12/13/09 - Added code to allow Mathomatic output to be redirected by default. Fixed the derivative command to be successful even when the result is 0, when compiled as a library. 12/14/09 - Added ability to log symbolic math library results, and made command behavior more consistent in the library by always returning the final result string. 12/16/09 - The factor command now factors more by factoring out the GCD of rational coefficients. CHANGES MADE TO MATHOMATIC 14.6.3 TO BRING IT UP TO 15.0.0: Cleanup and more bug fixes. 11/26/09 - Added detection of the terminal's ANSI color availability, when readline is enabled. 11/28/09 - Added detection of divide by zero and NaN when using the "solve verify" command, for more correct results. Solving now factors out the GCD of rational coefficients, for improved results. The fixes today are from errors solving equations like (2*x/(x - 3)) + 3 = 6/(x - 3) 11/29/09 - Disallow the variable named "nan". NaN cannot be directly entered into Mathomatic. 11/30/09 - Added shell scripts "t" and "tests/t" to easily test Mathomatic by typing "./t". 12/2/09 - The fraction command now factors out the GCD of rational coefficients like the solve command does, so that coefficients in algebraic fractions become integers. The GCD verifying routine was perfected by making it very strict, like it should be.
2010-08-30 04:48:40 +02:00
TEST_TARGET= test
BUILDLINK_API_DEPENDS.readline+= readline>=5.1pl1nb1
.include "../../devel/readline/buildlink3.mk"
Update to Mathomatic 15.2.0 CHANGES MADE TO MATHOMATIC 15.2.0 TO BRING IT UP TO THE NEXT VERSION: All makefiles were improved. Library test/example program is renamed to "testmain". Package maintainers please take note: support for the DESTDIR environment variable was added to the makefiles; for proper operation when packaging version 15.2.1 or higher, please remove any patches for missing DESTDIR support. m4 Mathomatic should work now when included in the Mathomatic package (make m4install). Thank you for packaging Mathomatic! If I did anything wrong, please let me know. 8/26/10 - Added the -e option, which processes mathematical expressions and Mathomatic commands instead of input files on the shell command line. For example, entering "mathomatic -eq 2+3" gives "answer = 5". This functionality has been requested many times by Mathomatic command line users. A complete example: CHANGES MADE TO MATHOMATIC 15.1.6 TO BRING IT UP TO THE NEXT VERSION: Minor improvements were made to the user documentation. 8/22/10 - Removed "Complex number roots approximated" warning message, since this happens often. Capitalized E, I, PI, and Pi are now accepted as the universal constants e, i, and pi, without needing to enter "set no case". This allows Mathomatic to easily accept Mathematica style expression input. m4 Mathomatic now additionally accepts Mathematica style capitalized function input. matho and rmath now display elapsed, CPU, and system times in seconds upon exit. 8/23/10 - Fixed #equation-number entry at the main prompt to always work and allow an expression or equation following on the same line to be entered at that equation space. For example: "#10 y=1/x" will work now; previously only worked if equation space number 10 was previously allocated and used. The way it works is: all equation spaces up to and including number 10 are allocated, if not already allocated, upon entry of "#10". Equations spaces are allocated with the memory allocator malloc(3). CHANGES MADE TO MATHOMATIC 15.1.5 TO BRING IT UP TO THE NEXT VERSION: 7/26/10 - Disabled ncurses call for auto-color detection when CYGWIN is defined while compiling the source code, due to a reported problem of readline failing with ncurses in Cygwin. 7/28/10 - Disabled readline history save file for the Cygwin port, because it is a filename that starts with a period. 7/31/10 - Added "set fractions_display" option, to allow disabling the automatic conversion of fractions like .5 to 1/2 for display. Developer requested and useful in the symbolic math library, when numerical fraction output isn't wanted. 8/01/10 - Fixed a memory leak when ignoring the output string in the symbolic math library. 8/04/10 - Preserve overflowed powers like 2^2222 rather than aborting with an error message. Allow simplification of math like 2*2^2222 and 2/2^2222. 8/08/10 - matho-primes runs twice as fast with the -ffast-math gcc compilation option, which is now enabled by default. Don't try -ffast-math with the main Mathomatic program though, because then Mathomatic won't work properly. CHANGES MADE TO MATHOMATIC 15.1.4 TO BRING IT UP TO THE NEXT VERSION: Many minor tweaks and improvements. 7/03/10 - Makefiles and compile scripts were corrected and enhanced per http://www.gnu.org/prep/standards/ 7/06/10 - Changed all "#if true" and "#if false" conditional commenting to "#if 1" and "#if 0" in the C source code, thanks to Min Sik Kim of NetBSD pkgsrc. CHANGES MADE TO MATHOMATIC 15.1.3 TO BRING IT UP TO THE NEXT VERSION: All of the Unix man pages and user manuals for Mathomatic were fixed. The compare and "solve verify" commands now simplify more thoroughly with "repeat simplify" for better expression equality determination. 6/17/10 - Greatly improved file operation error reporting by using the perror(3) function. 6/18/10 - Fixed categories in "icons/mathomatic.desktop"; Mathomatic now goes under valid categories, mainly Education. CHANGES MADE TO MATHOMATIC 15.1.2 TO BRING IT UP TO THE NEXT VERSION: 6/6/10 - I made mistakes in the improvement to the simplify command of version 15.1.2, the original working simplify logic of version 15.1.1 is now restored, sorry. CHANGES MADE TO MATHOMATIC 15.1.1 TO BRING IT UP TO THE NEXT VERSION: A general cleanup was done. A small improvement was made to the final result of the simplify and fraction commands. Showing intermediate results in the calculate, sum, and product commands is now done with "set debug 1". 5/28/10 - Added "tests/collatz.in", the Collatz conjecture as an automatically computable equation. CHANGES MADE TO MATHOMATIC 15.1.0 TO BRING IT UP TO THE NEXT VERSION: Code and documentation cleanup. 5/21/10 - Added "primes/matho-sum", a utility that sums its command line arguments or standard input. Use "matho-primes 0 2000000 | matho-sum" to find the sum of all primes less than 2,000,000. Solves Project Euler problem #10: http://projecteuler.net/index.php?section=problems&id=10 5/23/10 - Primes (') are allowed in variable names now, if not using the symbolic math library, so that the derivative, integrate, and nintegrate commands can change the dependent variable to y', y'', etc. This can be turned on in the symbolic math library by the command "set special_variable_characters='". Non-alphanumeric characters in variable names are now converted to underline characters (_) when exporting to a programming language or to a different program. CHANGES MADE TO MATHOMATIC 15.0.8 TO BRING IT UP TO THE NEXT VERSION: 5/10/10 - Added "help constants" command. 5/11/10 - Integer variables are now specified by using a variable name that starts with "integer", like "integer1", "integer_x", etc. Currently only the modulus operator "%" checks for integer variables, to help with simplification. 5/12/10 - Corrected the output string type of the symbolic math library API. It was erroneously declared as type "const", possibly causing a memory leak. 5/13/10 - Moved and adapted "makefile.lib" to "lib/makefile", so the symbolic math library build is isolated. Previously "make clean" was required between different builds. All makefiles require GNU make now. CHANGES MADE TO MATHOMATIC 15.0.7 TO BRING IT UP TO THE NEXT VERSION: 4/26/10 - Allow "make pdf" to generate PDF documentation from the HTML documentation with htmldoc. Please read the comments in the makefile for all available options. 4/29/10 - For every makefile, CFLAGS has been modified to include OPTFLAGS as required by the Fedora Linux build system, and OPTFLAGS defaults to the optional gcc specific flags like optimization. In the symbolic math library, made available the equation number of the result of calling the API, if also stored in an equation space. The result equation number is stored in the global "result_en". Useful if you want to know where the result was stored, to act on it with further commands. CHANGES MADE TO MATHOMATIC 15.0.6 TO BRING IT UP TO THE NEXT VERSION: Corrections and improvements to the documentation were made. 4/3/10 - Vastly improved the "factor number" user interface, now factors integer expressions like 2^32-1. "factor number" is disabled in library mode. 4/13/10 - The real and imaginary commands no longer fail when the expression is not complex, just a warning is given. 4/14/10 - Changed normal display of "-1*" to "-", for prettier 2D expression output, so things like "-a" display properly, not as "-1*a". CHANGES MADE TO MATHOMATIC 15.0.5: 1/28/10 - Added a Python utility called "primorial" to the Prime Number Tools install that multiplies together the results of matho-primes, displaying the primorials of the integers given on the command line. 3/18/10 - Changed author email address to "gesslein@linux.com". 3/23/10 - Catch SIGHUP and SIGTERM signals for proper termination of the Mathomatic program; readline was messing up when Mathomatic was terminated by closing the shell window. The plot command now always plots expressions with grid marks displayed for reference. CHANGES MADE TO MATHOMATIC 15.0.4: 1/21/10 - In the makefile, changed the HTML man page generator back to rman because groff HTML output looks really bad and rman allows linking to other man pages. groff is no longer used. 1/24/10 - Fixed "make m4install", the installed rmath and matho programs weren't working. 1/27/10 - Added GNU LGPL license notices to every C source file with a copyright notice, for proper protections. CHANGES MADE TO MATHOMATIC 15.0.3: 1/9/10 - Fixed a problem only in the version 15.0.3 makefile, where it didn't respect the CC environment variable set by the user, instead it always used "gcc" as the C compiler. CHANGES MADE TO MATHOMATIC 15.0.2: 12/27/09 - Moved get_screen_size() from main.c to am.c because it is used in the library when compile-time options UNIX or CYGWIN are defined. Thanks to Cygwin port maintainer Reini Urban for noticing and fixing this problem. Defining UNIX or CYGWIN in library mode is not recommended. 12/31/09 - Added code to allow any command to be preceded by "repeat", which sets the repeat flag for the following command. Most commands ignore the repeat flag. 1/1/10 - Ported divide and roots commands to be repeatable. Also repeatable are the calculate and eliminate commands. 1/2/10 - Allow Taylor series computation even if the specified differentiation variable is not found in the expression, giving a warning. Ported simplify command to be a repeatable full simplify; that is, typing "repeat simplify" repeatedly runs the simplify command until the result stabilizes to the smallest size expression. 1/7/10 - Thanks to pretty C code submitted by Simon Geard, the code and variables commands have been made much more readable. 1/8/10 - Made Mathomatic easier to compile under Solaris, thanks to Michael Pogue of Sun. Fixed failure to compile under BSD Unix when compiling with readline support. CHANGES MADE TO MATHOMATIC 15.0.1: 12/19/09 - The last few versions fix the ugliness caused by the GCD factoring change made on 6/22/09. Today's change factors out the numerical GCD of rational coefficients as needed to simplify. Most simplification results should be beautiful and the simplest possible again now, without the misleading observed magnitude caused by always factoring out the GCD, which was why the change of 6/22/09 was made. CHANGES MADE TO MATHOMATIC 15.0.0: 12/12/09 - Fixed a problem with the -q (quiet mode) option being ignored if the session options were ever saved with the "set save" command. 12/13/09 - Added code to allow Mathomatic output to be redirected by default. Fixed the derivative command to be successful even when the result is 0, when compiled as a library. 12/14/09 - Added ability to log symbolic math library results, and made command behavior more consistent in the library by always returning the final result string. 12/16/09 - The factor command now factors more by factoring out the GCD of rational coefficients. CHANGES MADE TO MATHOMATIC 14.6.3 TO BRING IT UP TO 15.0.0: Cleanup and more bug fixes. 11/26/09 - Added detection of the terminal's ANSI color availability, when readline is enabled. 11/28/09 - Added detection of divide by zero and NaN when using the "solve verify" command, for more correct results. Solving now factors out the GCD of rational coefficients, for improved results. The fixes today are from errors solving equations like (2*x/(x - 3)) + 3 = 6/(x - 3) 11/29/09 - Disallow the variable named "nan". NaN cannot be directly entered into Mathomatic. 11/30/09 - Added shell scripts "t" and "tests/t" to easily test Mathomatic by typing "./t". 12/2/09 - The fraction command now factors out the GCD of rational coefficients like the solve command does, so that coefficients in algebraic fractions become integers. The GCD verifying routine was perfected by making it very strict, like it should be.
2010-08-30 04:48:40 +02:00
#.include "../../devel/ncurses/buildlink3.mk"
.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../mk/bsd.pkg.mk"