Wolfram Library Archive

All Collections Articles Books Conference Proceedings
Courseware Demos MathSource Technical Notes
Title Downloads

A RealOnly Package That Can Be Disabled or Enabled

Ted Ersek
Organization: Naval Air Warfare Center, Aircraft Division
URL: http://www.verbeia.com/mathematica/
Old MathSource #

Revision date


RealOnly is a Standard Packages included with Mathematica, and is used to ensure a Negative number to a Rational power is Negative when the exponent is Rational and the Denominator of the exponent is odd. One problem with the RealOnly package is that once the package is loaded restoring the normal Mathematica behavior is cumbersome at best. A package called SwitchableRealOnly is provided which does the same thing as the RealOnly package, and provides a simple method of switching between the normal Mathematica implementation and the RealOnly implementation of (x^y). Another problem with the RealOnly package is that once the package is loaded Roots and Solve incorrectly indicate that some solutions to certain equations are not real. This error is corrected in the SwitchableRealOnly package. The package and a documentation are provided in SwitchableRealOnly.m and SwitchableRealOnlyExamples.nb respectively.

*Mathematics > Algebra > Polynomials
*Mathematics > Number Theory
*Wolfram Technology > Programming > Equation Solving
*Wolfram Technology > Standard Packages

equation solving, real and complex roots, rational powers
Downloads Download Wolfram CDF Player

SwitchableRealOnly.m (6.4 KB) - Mathematica package [for Mathematica 5.0]
SwitchableRealOnlyTutorial.nb (51.5 KB) - Mathematica notebook [for Mathematica 5.0]