PHP Classes
Icontem

Class: Rational


  Search   All class groups All class groups   Latest entries Latest entries   Top 10 charts Top 10 charts   Newsletter Newsletter   Blog Blog   Forums Forums   Help FAQ Help FAQ  
  Login   Register  
Recommend this page to a friend! ReTweet ReTweet Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Richard Munroe  >  Rational  >  Download  >  Support forum Support forum (1)  >  Blog Blog  >  RSS 1.0 feed RSS 2.0 feed Latest changes  
Name: Rational Support forum
Base name: rational
Description: Perform arithmetic operations on rational numbers
Version: -
Required PHP version: -
License: Custom (specified in a license file)
All time users: 273 users
All time rank: 4461
Week users: 1 user
Week rank: 3269
 
  Author   Group folder image Groups   Detailed description  
  Rate classes User ratings   Dependencies   Applications   Files Files  

Author

Picture of Richard Munroe
Name: Richard Munroe is available for providing paid consulting. Contact Richard Munroe .
Published packages: 22 Browse this author's classes Browse this author's classes
Country: United States United States - PHP jobs in United States
Home page: http://www.csworks.com/
Age: 59
All time rank: 13
Week rank: 23

Innovation Award

PHP Programming Innovation award nominee
February 2006
Number 4
PHP supports all the kinds of arithmetic operations that can be performed between numbers. However, certain operations between rational numbers may result in values that loose precision because PHP represents the results as floating point values.

This class provides means to perform basic arithmetic operations between rational numbers, in a way that the results are also rational numbers, and so they do not loose precision.

Manuel Lemos

Groups

Group folder image Math Math related classes. View top rated classes

Detailed description

This performs arithmetic operations using rational numbers.

Rational numbers are those numbers that can be represented as the ratio between two integer numbers. Any real number with a finite number decimal digits or that repeats a sequence of digits can be represented as a rational number.

This class can add, subtract, multiply, and divide rational numbers.

The results of the operations are also rational numbers, simplified to eliminate any common factors of the the numerator and denominator. This way the arithmetic operations are performed without loss of precision, a common failing of floating point arithemetic.

User ratings

Not yet rated by the users

Packages needed by this class

Class Dependency Why it is needed
Numerical
Required
Several functions are required for conversion to rational form and simplifying rational numbers.

Applications that use this class

No application links were specified for this class.
Add link image If you know an application of this package, send a message to the author to add a link here.

Files

File Role Description
Plain text file class.Rational.php Class Class file for rational numbers.
Plain text file example.php Example Examples of rational number arithmetic
HTML file license.txt Lic. Modified NetBSD License
Plain text file makedoc.sh Data Generate documentation using phpdoc
Download all files: rational.tar.gz rational.zip
NOTICE: if you are using a download manager program like 'GetRight', please Login before trying to download this archive.

 
  Advertise on this site Advertise on this site   Site map Site map   Statistics Statistics   Site tips Site tips   Privacy policy Privacy policy   Contact Contact  

For more information send a message to :
info at phpclasses dot org.
Copyright (c) Icontem 1999-2009 PHP Classes - PHP Class Scripts
  PHP Book Reviews - Reviews of books and other products