Commit graph

34 commits

Author SHA1 Message Date
minskim
3fd5abbf1a Update mathomatic to 12.2b.
Changes since 12.1d:
  - Various improvements and bug fixes.
  - Documentation with full command reference.
2005-03-28 14:52:28 +00:00
minskim
ee0cae71c1 Update mathomatic to 12.1d.
Changes since 11.7:
- Increased precision and optimization of code command.
- Prepared code for future improvement to integrate command.
- Integrate (a*constant^x) for x has been added.
- Allow differentiation and integration of -constant^x.
- Disabled power factoring of k^x*k^y, where k is a constant.
  This fixes a small bug.
- Reduced stack usage by almost 2/3.
- Reduced stack usage another large amount to the smallest it can be.
- Laplace (a*constant^x) and (a/constant^x) for x has been added.
- Allow integration of (a/constant^x) for x.
- Moved all numeric GCD routines to "gcd.c".
- Improved limit command for "limit x inf".
- Halved the default equation size and doubled the number of equation
  spaces to 40.
- Fixed bug that caused infinite loop for "2^(.5*n)" and incorrect answer
  for "-1^(2*n)".
- Allow edit command to work with no equations defined.
- Allow typing "abort" or "quit" during pause command.
- They both abort the current operation.
- Removed usage displayed every time a command fails.
- Simplify command once again prefers 1/(constant^n) instead of (1/constant)^n.
- Added "set finance" option.
- Some improvement to simplification of constants.
- Improved "factor number" command.  Made self-testing and allow
  multiple integers.
- Strip trailing newlines from string returned by getstring().
- Re-enabled power factoring of k^x*k^y, where k is a constant.
- The bug it had caused just disappeared.
- This is because a lot of changes have been made.
- Some speed up in polynomial factoring made by ignoring anything that
  is not a polynomial in any variable.
- Improved denominator rationalizer.
- Disabled power factoring of -1^x*-1^y.  This time it is done right.
- Added new function debug_string().  It simplifies the debugging code.
- Simplified pf_sub() (the polynomial factoring subroutine).
- Fixed up Prime Number Tools man pages.
- Improved matho-twin.
- Added simplification of roots like 12^.5 to 2*(3^.5) in simplify command.
- Code cleanup.
- Improved the results of solving by not always factoring constants.
- Added semicolon (";") to end of each line when using "list export".
- Some improvement made to the simplify command.
- More tests added to test suite.
- Fixed bug in patch_root_div().
- Fixed infinity/nan bug in uf_repeat().
2005-03-05 03:01:50 +00:00
agc
1e46c076aa Add RMD160 digests in addition to SHA1 ones. 2005-02-23 12:06:53 +00:00
minskim
bd7e54a2f0 Update mathomatic to 11.7.
Changes:

Another minor adjustment to simplify command to make everything work
just right.

Trap "derivative x" of (negative constant or zero)^x.

Solve "(constant)^y=constant" for y.

Moved all html files and the man page to subdirectory "doc".

Code cleanup.

Improved modulus solving.

Trap "x%0".  Simplify "x%inf".

Fix fraction list display of -0.

Change for better simplification.

Fix for division by roots of fractions.
2005-01-29 10:53:17 +00:00
minskim
f2cd83b8dd Update mathomatic to 11.6d.
Changes:

Some more improvement to simplification.

Displayed floating point precision reduced to 12 digits.

Allow typing just "e#" or "pi" on the command line, to give the
values for each.

Changed simplify command to prefer (1/constant)^n instead of 1/(constant^n).
It produces more efficient code and solves a problem.

Improved "code integer" command by allowing integer powers.

Improved eliminate command by trying next equation if solve fails.

"list export" now produces 100% Maxima compatible equations.

Changed "SILENT" compile time define to also remove all debugging code.
2005-01-14 14:52:44 +00:00
minskim
9416a40c03 Update mathomatic to 11.6c.
Changes:
- Some more touch-ups to solve routine.
- Changed uf_repeat() to skip expanding if the expression would be too big.
  This allows Mathomatic to work with huge exponents.
- Turned on "preserve_roots" option by default.
- Improved sum and product commands.  Allow counting down.
- Improved solve routine and removed display of useless messages.
- Added a fix to the limit command.
- Moved "source.txt" into "README.txt".
- Added code to simplify (inf+a) to (inf) generally.
- Fixed minor bug in calculate command.
- Minor fixes to elim_k().
- Improved limit command.
- Made all recursive functions in the source code static.
  Most functions never used globally defined as static.
- Improvement in command argument parsing.
- Added extrema command.
- Improved output of roots command.
- Fixed minor bug caused by "preserve_roots" option.
- Made file "am.htm" valid HTML.
- Simplification improved.
2005-01-08 07:09:50 +00:00
minskim
0289f78858 Update mathomatic 11.6.
Changes:
  - Many minor improvements made, none of which are worth mentioning by
    themselves.
  - Fixed all message strings with a variable listed in them.
  - Added iteration option to calculate command.
  - Trimmed set command of fat.  Unnecessary messages removed.
  - Removed all occurrences of "usage_flag".
  - Usage info is now displayed everytime a command returns with error.
  - Allow parsing of hexadecimal constants.  Preceed hex numbers with
    "0x".
  - There may be parsing bugs.  Systems using older versions of the GNU
    libraries (specifically strtod(3)) will not allow hexadecimal input.
  - Added limit command.
  - Trapped 0^(negative number).  It previously produced junk.
  - Allow solve routine to produce infinity as an answer.
  - Some commenting and fixing done to solve routine.
2004-12-26 06:19:11 +00:00
minskim
91fc8e4b8e Update mathomatic to 11.5c.
Changes:
  - Added loading of $HOME/.mathomaticrc on startup.
    Set options go there.
  - Added undocumented switch "-t" which sets test mode.
    Only used with "make test".
  - Wrote and added "matho-pascal" program to primes directory.
  - Allow "=" in set command.
  - Improved uf_repeat() and modulus simplification.
2004-12-01 04:06:03 +00:00
minskim
6f781c94ba Update mathomatic to 11.5b.
Changes:
  - Made HTML mode ("mathomatic -h") not use readline.
  - Added "set true_modulus" option.
  - Improved output of roots command.
  - Code cleanup.
2004-11-24 14:52:28 +00:00
minskim
334ea52c17 Update mathomatic to 11.5.
Changes:
  - Using "memmove()" instead of deprecated "bcopy()".
  - Added "tests/tutor.in", which is an incomplete Mathomatic tutor.
  - Many improvements to scripts in the tests directory.
  - Removed "calculate factor" option.
  - Code cleanup.
  - Added more modulus simplification.
  - Simplify ((a%n)*integer+b)%n to (a*integer+b)%n generally and completely.
  - real^complex and complex^complex are now approximated.
2004-11-10 16:47:20 +00:00
minskim
a9901600ba Update mathomatic to 11.4d.
Changes:
  - Removed obsolete short variable name code and bumped up "MAX_VARS" to 500.
  - Fixed problem with conflicting names and code for "cpow()" and "cexp()".
    Renamed to "complex_pow()" and "complex_exp()".
2004-10-30 15:07:01 +00:00
minskim
384ddcd4ea Update mathomatic to 11.4c.
Changes:
  - Code cleanup.  Polynomial division routine is now very easy to use.
  - Renamed "WINDOWS" define to "CYGWIN".
  - Added "set preserve_roots" option.
  - Added modulus solving.
2004-10-20 02:07:56 +00:00
minskim
27283744d3 Update mathomatic to 11.4b.
Changes:
  - Added "code integer" command, which outputs working C code with integer
   variables.
  - Changed makefile to use libncurses instead of libcurses.
  - Added more simplification rules for modulus.
2004-10-14 13:43:26 +00:00
minskim
bc51244960 Update mathomatic to 11.4.
Changes:
Changed sum and product commands to not create another equation if the
result is a constant.  If the result is a constant, it is just displayed.

Mathomatic now approximates -1^(2^.5) and the like.

Added modulus (%) operator.

Added simplification of univariate modulus expressions.

Changed univariate modulus simplification to multivariate, integer only
simplification.
2004-10-04 21:32:28 +00:00
tv
c487cb967a Libtool fix for PR pkg/26633, and other issues. Update libtool to 1.5.10
in the process.  (More information on tech-pkg.)

Bump PKGREVISION and BUILDLINK_DEPENDS of all packages using libtool and
installing .la files.

Bump PKGREVISION (only) of all packages depending directly on the above
via a buildlink3 include.
2004-10-03 00:12:51 +00:00
minskim
01cfe1c349 Update mathomatic to 11.3f.
Changes since 11.3c:

Improved eliminate command error handling.

Added "eliminate all" command.

Code cleanup.

Man pages for the prime number tools were contributed
by David Moreno Garza.  Many thanks.

Renamed the Mathomatic directory in the source tarball to
"mathomatic-`cat VERSION`".

Added several comments to the source code.

Renamed prime number tools to "matho-*".

Improvement to full simplification.

Tried something new with uf_simp() that fixed a problem with Mathomatic
solve complicating expressions.

Minor bugfix to eliminate command.
2004-09-25 00:40:53 +00:00
minskim
2933f80830 Update mathomatic to 11.3c.
Changes:

"factor number" command now accepts more than one integer.

Added file "mathomatic.ico".

Added temporary fix for 64 bit longs.

Added file "VERSION" which contains the version number of Mathomatic.
"makefile" modified.

Renamed "lgpl.txt" to "LICENSE.txt".

"make install" now installs all HTML files in "/usr/local/doc/mathomatic".

Added compile-time define "TIMEOUT_SECONDS".
Useful for limiting the amount of time Mathomatic can run as a CGI.
2004-08-04 19:59:59 +00:00
minskim
9642bfa73d Update mathomatic to 11.3b.
Changes:
Proper exit after error reading files on the command line.

Added code to preserve roots of integers, if the result is irrational.

Fixed "calculate >filename".

Made "+/-2^.5" work as expected.

Code cleanup.

Full simplify added for every loop of taylor command.

Removed "replace temp" option, so that the "temp" variable can be renamed.
2004-07-26 17:37:02 +00:00
minskim
576a23327d Update mathomatic to 11.3.
Changes:
Substantial change/improvement to simplify command.

Added some more code to fix floating point inaccuracies.

Improved solving.  y=(x+1/x)^3 solves both ways, now.

Full simplify after every loop in derivative command added.

Move derivative and taylor commands to "diff.c".

Added "-m" option to Mathomatic (memory size multiplier).
It sets the size of equation spaces at run time.
2004-07-13 21:12:23 +00:00
minskim
bbbefe1a97 Update mathomatic to 11.2e.
Changes:
  Renamed the Mathomatic executable to "mathomatic".

  Add inverse Laplace transform.  Usage: laplace inverse x

  Fixed bug in solving for zero, which occurred when there were no
  variables in the divisor.

  Some improvement in solve routine.
2004-07-04 16:38:47 +00:00
minskim
ac24d7b58c Update mathomatic to 11.2d.
Changes:

Slight improvement to integrate and laplace commands.
Integrate/laplace x on (a+x)/(b+c) works now.

Added more examples to the documentation (am.htm).

2 to 10 times speedup for simplify command by fixing polynomial factoring.
2004-06-28 13:58:25 +00:00
minskim
399b1911ba Update mathomatic to 11.2c.
Changes since 11.2:

Doubled the default amount of memory consumption to 11 megabytes.
This allows equations twice as large.

Fixed bug factoring infinity.

Slight improvement to "integrate" command.

Trap window resize signal and set number of screen columns and rows.

Code cleanup.

Fixed factoring of constants in factor command.

Added "laplace" command.

Allow "#" as a comment, as long as it is not immediately followed by
a number.

Enabled shelling out for all versions with the "!" command.

Improvement and speedup for poly_gcd() and poly2_gcd().

Slight improvement in polynomial factoring made by deleting 1 line of code.

Use getopt(3) to parse command line options.

Made "-c" and "-h" options work together.  If both are specified,
work in HTML mono mode.
2004-06-26 21:23:43 +00:00
minskim
228ad5d1fc Update mathomatic to 11.2.
Changes since 11.1c:

Moved notification of polynomial factoring success to debug level 1 or higher.

Removed "NO_COMPLEX_ROOTS" compile-time define option.
I am thinking of making this a run-time option.

Increased security of "SECURE" compile-time define.
Absolutely no file operations are allowed or linked in.

Added check for terminal with isatty().
This allows better piping into Mathomatic.

Split up change-log ("changes.txt" and "changes_old.txt").

Changed "x!" to mean gamma(x+1) for Laplace transforms.

Fixed parsing of things like "2e#", which failed before,
thinking it was scientific notation.

Wrote "primes/twin.c", to find twin primes.

Added "help usage" command.

Allow output of "help" command to be redirected to a file.

Fixed parsing of variable names (like "pig", which didn't work right).

Added "integrate" command.

Fixed "derivative" command.

Code cleanup.

Fixed "taylor" command.
2004-06-04 03:38:29 +00:00
minskim
37bad97606 Update mathomatic to 11.1c.
Changes:
  Perfected factoring of constants in final stage of simplify command.
2004-05-20 21:27:24 +00:00
minskim
03bc3b279e Update mathomatic to 11.1b.
Changes since 11.1:
Added Java code generation (usage: "code java").

Added "list export" option, to display equations in exportable format.
They can be cut-and-pasted to another math program with this option.

Added a blank line after every equation listed with the "list" and
"code" commands.  Looks better.

Made "MAX_VAR_LEN" completely flexible (can be set to any value; set to 80).

Improved factoring of polynomials with repeated factors by trying to
differentiate with respect to every variable.
2004-05-14 15:01:31 +00:00
minskim
76ac2ced9d Update mathomatic to 11.1.
Changes:
- Fixed "makefile" to be completely portable.
  No longer requires GNU make.
- Simplified some code.
- Converted token_type.kind to enum type for better type checking.
- Removed all "unsigned" variables and type casts.
- Simplified "simplify" command code.  Some speed up.
- Moved "*.in" and "fix*" to directory "tests".
- Implemented long variable names (up to 40 characters).
2004-05-10 16:47:15 +00:00
minskim
f3bddedf0d Update mathomatic to 11.0f.
Changes:
  - Removed calc() fraction code for accuracy because of fraction slack
    that was implemented in version 10.9c.
  - Solve increase power function wasn't working with odd number roots.
    Fixed.  Appears to be another gcc optimizer bug.
  - Improved simplify command.
  - Tweaked factor_constants().
  - Some changes to "makefile" for "readline" support.
    "GNU make" or "gmake" required now.
  - Fixed solving of "x^(1/99)=x".
  - Fixed readline bug.
2004-05-04 17:20:48 +00:00
minskim
bc18191842 Update mathomatic to 11.0e.
Changes:
 - Changed unfactoring to improve simplification (again).  This was a
   bug fix (first one in a long time).
 - Restored "epsilon" to original value in version 10.9b.  Required
   for factoring large polynomials.
 - Changed factor_times() to preserve divides.  This improved the
   "unfactor" command.
 - Added polynomial factoring to the very beginning of "simplify"
   command.  This is necessary in case you "unfactor" a complicated
   equation, then "simplify".
2004-04-28 04:28:57 +00:00
minskim
addd63a8ff Update mathomatic to 11.0d.
Changes:
  - Removed some simplification optimizations in favor of correctness
    and simpler code.  Minor slowdown.
  - Doubled "MAX_COMPARE_TERMS".
  - Simplify order poly_div then smart_div reversed.
  - Kludge for size checking in poly_div removed.
  - Broke "am.in".  Edited.
  - Added "simplify poly" option to do poly_div first.
2004-04-24 15:44:19 +00:00
minskim
48267d7159 The author confirmed that the problem caused by gcc optimization was
fixed.  Return to default optimization level.

Bump PKGREVISION.
2004-04-22 23:45:54 +00:00
minskim
169d579959 Update mathomatic to 11.0c.
Changes:
  - Fixed HTML mode "screen_rows" and "screen_columns" to be unlimited.
  - Allow square brackets ([]) as parentheses and optimized parser.
  - Simplification was improved.
2004-04-21 21:26:25 +00:00
minskim
b1ed76d29f Bump PKGREVISION due to distfile changes (this package has
DIST_SUBDIR=${PKGNAME}).  The author made functional changes without
bumping the version number. :(

This closes PR pkg/25258.
2004-04-20 17:18:50 +00:00
minskim
920fbcee7c Update mathomatic to 11.0b.
Changes since 10.9b:
  - Removed more MS-DOS specific code; functionality improved.
  - Implemented what I call "fraction slack".  This perfects float to
    fraction conversion, and now Mathomatic doesn't rely on perfect
    floating point routines.  "-O" option added to CFLAGS in file
    "makefile" (we can do this now).
  - Changed modf() to fmod() where possible.
  - Accuracy increased one more digit by reducing the "epsilon" variable.
  - Cleaned up "makefile".
  - Took a step towards internationalization with gettext(3) by
    calling _() for all English strings.  Everything ported except for
    the "help" command.
  - Commented out some unfactoring code that wasn't helpful and took out
    the "pause" command from "all.in" for easier testing.
  - Rearranged "simplify" command to simplify better.
  - Removed some more unfactoring code and made simplification much
    better.  Go figure.  Perfection has been achieved.
  - Added "unfactor fully" option.
  - Added "make test" to fully test Mathomatic after compilation.
  - Removed masking of 8th bit in all Mathomatic input.
  - Updated primes program with a nice user interface.
2004-04-17 17:08:37 +00:00
minskim
4fe29920ec Import mathomatic-10.9b from pkgsrc-wip.
Packaged by Bruce J.A. Nourish, and slightly modified by me.

Mathomatic is an automatic algebraic manipulator that is self-testing
and strictly follows the rules of algebra.

Mathomatic is an interpreter that can:
  - Solve, simplify, and compare algebraic equations.
  - Combine simultaneous equations.
  - Perform basic calculus operations.
  - Generate the sensitivity formula for one or more variables in an
    equation.
  - Act like a double precision floating point programmable calculator.
  - Perform complex number and polynomial arithmetic.
  - Compute the Greatest Common Divisor of numbers or polynomials.
  - Generate "C" code from equations.
2004-03-31 18:14:08 +00:00