function createError(name) {

    function errorConstructor() {
      var temp = Error.apply(this, arguments);
      temp['name'] = this['name'] = name;
      this['stack'] = temp['stack'];
      this['message'] = temp['message'];
    }

    /**
     * Error constructor
     *
     * @constructor
     */
    function IntermediateInheritor() {}
    IntermediateInheritor.prototype = Error.prototype;
    errorConstructor.prototype = new IntermediateInheritor();

    return errorConstructor;
  }
This class offers the possibility to calculate fractions.
You can pass a fraction in different formats. Either as array, as double, as string or as an integer.

Array/Object form
[ 0 => <nominator>, 1 => <denominator> ]
[ n => <nominator>, d => <denominator> ]

Integer form
- Single integer value

Double form
- Single double value

String form
123.456 - a simple double
123/456 - a string fraction
123.'456' - a double with repeating decimal places
123.(456) - synonym
123.45'6' - a double with repeating last place
123.45(6) - synonym

Example:

var f = new Fraction("9.4'31'");
f.mul([-4, 3]).div(4.9);