{"ast":null,"code":"/**\r\n * @license Complex.js v2.0.12 11/02/2016\r\n *\r\n * Copyright (c) 2016, Robert Eisele (robert@xarg.org)\r\n * Dual licensed under the MIT or GPL Version 2 licenses.\r\n **/\n\n/**\r\n *\r\n * This class allows the manipulation of complex numbers.\r\n * You can pass a complex number in different formats. Either as object, double, string or two integer parameters.\r\n *\r\n * Object form\r\n * { re: <real>, im: <imaginary> }\r\n * { arg: <angle>, abs: <radius> }\r\n * { phi: <angle>, r: <radius> }\r\n *\r\n * Array / Vector form\r\n * [ real, imaginary ]\r\n *\r\n * Double form\r\n * 99.3 - Single double value\r\n *\r\n * String form\r\n * '23.1337' - Simple real number\r\n * '15+3i' - a simple complex number\r\n * '3-i' - a simple complex number\r\n *\r\n * Example:\r\n *\r\n * var c = new Complex('99.3+8i');\r\n * c.mul({r: 3, i: 9}).div(4.9).sub(3, 2);\r\n *\r\n */\n\n'use strict';\n\nvar cosh = function (x) {\n  return (Math.exp(x) + Math.exp(-x)) * 0.5;\n};\nvar sinh = function (x) {\n  return (Math.exp(x) - Math.exp(-x)) * 0.5;\n};\n\n/**\r\n * Calculates cos(x) - 1 using Taylor series if x is small.\r\n *\r\n * @param {number} x\r\n * @returns {number} cos(x) - 1\r\n */\n\nvar cosm1 = function (x) {\n  var limit = Math.PI / 4;\n  if (x < -limit || x > limit) {\n    return Math.cos(x) - 1.0;\n  }\n  var xx = x * x;\n  return xx * (-0.5 + xx * (1 / 24 + xx * (-1 / 720 + xx * (1 / 40320 + xx * (-1 / 3628800 + xx * (1 / 4790014600 + xx * (-1 / 87178291200 + xx * (1 / 20922789888000))))))));\n};\nvar hypot = function (x, y) {\n  var a = Math.abs(x);\n  var b = Math.abs(y);\n  if (a < 3000 && b < 3000) {\n    return Math.sqrt(a * a + b * b);\n  }\n  if (a < b) {\n    a = b;\n    b = x / y;\n  } else {\n    b = y / x;\n  }\n  return a * Math.sqrt(1 + b * b);\n};\nvar parser_exit = function () {\n  throw SyntaxError('Invalid Param');\n};\n\n/**\r\n * Calculates log(sqrt(a^2+b^2)) in a way to avoid overflows\r\n *\r\n * @param {number} a\r\n * @param {number} b\r\n * @returns {number}\r\n */\nfunction logHypot(a, b) {\n  var _a = Math.abs(a);\n  var _b = Math.abs(b);\n  if (a === 0) {\n    return Math.log(_b);\n  }\n  if (b === 0) {\n    return Math.log(_a);\n  }\n  if (_a < 3000 && _b < 3000) {\n    return Math.log(a * a + b * b) * 0.5;\n  }\n\n  /* I got 4 ideas to compute this property without overflow:\r\n   *\r\n   * Testing 1000000 times with random samples for a,b ∈ [1, 1000000000] against a big decimal library to get an error estimate\r\n   *\r\n   * 1. Only eliminate the square root: (OVERALL ERROR: 3.9122483030951116e-11)\r\n     Math.log(a * a + b * b) / 2\r\n     *\r\n   *\r\n   * 2. Try to use the non-overflowing pythagoras: (OVERALL ERROR: 8.889760039210159e-10)\r\n     var fn = function(a, b) {\r\n   a = Math.abs(a);\r\n   b = Math.abs(b);\r\n   var t = Math.min(a, b);\r\n   a = Math.max(a, b);\r\n   t = t / a;\r\n     return Math.log(a) + Math.log(1 + t * t) / 2;\r\n   };\r\n     * 3. Abuse the identity cos(atan(y/x) = x / sqrt(x^2+y^2): (OVERALL ERROR: 3.4780178737037204e-10)\r\n     Math.log(a / Math.cos(Math.atan2(b, a)))\r\n     * 4. Use 3. and apply log rules: (OVERALL ERROR: 1.2014087502620896e-9)\r\n     Math.log(a) - Math.log(Math.cos(Math.atan2(b, a)))\r\n     */\n\n  return Math.log(a / Math.cos(Math.atan2(b, a)));\n}\nvar parse = function (a, b) {\n  var z = {\n    're': 0,\n    'im': 0\n  };\n  if (a === undefined || a === null) {\n    z['re'] = z['im'] = 0;\n  } else if (b !== undefined) {\n    z['re'] = a;\n    z['im'] = b;\n  } else switch (typeof a) {\n    case 'object':\n      if ('im' in a && 're' in a) {\n        z['re'] = a['re'];\n        z['im'] = a['im'];\n      } else if ('abs' in a && 'arg' in a) {\n        if (!Number.isFinite(a['abs']) && Number.isFinite(a['arg'])) {\n          return Complex['INFINITY'];\n        }\n        z['re'] = a['abs'] * Math.cos(a['arg']);\n        z['im'] = a['abs'] * Math.sin(a['arg']);\n      } else if ('r' in a && 'phi' in a) {\n        if (!Number.isFinite(a['r']) && Number.isFinite(a['phi'])) {\n          return Complex['INFINITY'];\n        }\n        z['re'] = a['r'] * Math.cos(a['phi']);\n        z['im'] = a['r'] * Math.sin(a['phi']);\n      } else if (a.length === 2) {\n        // Quick array check\n        z['re'] = a[0];\n        z['im'] = a[1];\n      } else {\n        parser_exit();\n      }\n      break;\n    case 'string':\n      z['im'] = /* void */\n      z['re'] = 0;\n      var tokens = a.match(/\\d+\\.?\\d*e[+-]?\\d+|\\d+\\.?\\d*|\\.\\d+|./g);\n      var plus = 1;\n      var minus = 0;\n      if (tokens === null) {\n        parser_exit();\n      }\n      for (var i = 0; i < tokens.length; i++) {\n        var c = tokens[i];\n        if (c === ' ' || c === '\\t' || c === '\\n') {\n          /* void */\n        } else if (c === '+') {\n          plus++;\n        } else if (c === '-') {\n          minus++;\n        } else if (c === 'i' || c === 'I') {\n          if (plus + minus === 0) {\n            parser_exit();\n          }\n          if (tokens[i + 1] !== ' ' && !isNaN(tokens[i + 1])) {\n            z['im'] += parseFloat((minus % 2 ? '-' : '') + tokens[i + 1]);\n            i++;\n          } else {\n            z['im'] += parseFloat((minus % 2 ? '-' : '') + '1');\n          }\n          plus = minus = 0;\n        } else {\n          if (plus + minus === 0 || isNaN(c)) {\n            parser_exit();\n          }\n          if (tokens[i + 1] === 'i' || tokens[i + 1] === 'I') {\n            z['im'] += parseFloat((minus % 2 ? '-' : '') + c);\n            i++;\n          } else {\n            z['re'] += parseFloat((minus % 2 ? '-' : '') + c);\n          }\n          plus = minus = 0;\n        }\n      }\n\n      // Still something on the stack\n      if (plus + minus > 0) {\n        parser_exit();\n      }\n      break;\n    case 'number':\n      z['im'] = 0;\n      z['re'] = a;\n      break;\n    default:\n      parser_exit();\n  }\n  if (isNaN(z['re']) || isNaN(z['im'])) {\n    // If a calculation is NaN, we treat it as NaN and don't throw\n    //parser_exit();\n  }\n  return z;\n};\n\n/**\r\n * @constructor\r\n * @returns {Complex}\r\n */\nfunction Complex(a, b) {\n  if (!(this instanceof Complex)) {\n    return new Complex(a, b);\n  }\n  var z = parse(a, b);\n  this['re'] = z['re'];\n  this['im'] = z['im'];\n}\n_c = Complex;\nComplex.prototype = {\n  're': 0,\n  'im': 0,\n  /**\r\n   * Calculates the sign of a complex number, which is a normalized complex\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'sign': function () {\n    var abs = this['abs']();\n    return new Complex(this['re'] / abs, this['im'] / abs);\n  },\n  /**\r\n   * Adds two complex numbers\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'add': function (a, b) {\n    var z = new Complex(a, b);\n\n    // Infinity + Infinity = NaN\n    if (this['isInfinite']() && z['isInfinite']()) {\n      return Complex['NAN'];\n    }\n\n    // Infinity + z = Infinity { where z != Infinity }\n    if (this['isInfinite']() || z['isInfinite']()) {\n      return Complex['INFINITY'];\n    }\n    return new Complex(this['re'] + z['re'], this['im'] + z['im']);\n  },\n  /**\r\n   * Subtracts two complex numbers\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'sub': function (a, b) {\n    var z = new Complex(a, b);\n\n    // Infinity - Infinity = NaN\n    if (this['isInfinite']() && z['isInfinite']()) {\n      return Complex['NAN'];\n    }\n\n    // Infinity - z = Infinity { where z != Infinity }\n    if (this['isInfinite']() || z['isInfinite']()) {\n      return Complex['INFINITY'];\n    }\n    return new Complex(this['re'] - z['re'], this['im'] - z['im']);\n  },\n  /**\r\n   * Multiplies two complex numbers\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'mul': function (a, b) {\n    var z = new Complex(a, b);\n\n    // Infinity * 0 = NaN\n    if (this['isInfinite']() && z['isZero']() || this['isZero']() && z['isInfinite']()) {\n      return Complex['NAN'];\n    }\n\n    // Infinity * z = Infinity { where z != 0 }\n    if (this['isInfinite']() || z['isInfinite']()) {\n      return Complex['INFINITY'];\n    }\n\n    // Short circuit for real values\n    if (z['im'] === 0 && this['im'] === 0) {\n      return new Complex(this['re'] * z['re'], 0);\n    }\n    return new Complex(this['re'] * z['re'] - this['im'] * z['im'], this['re'] * z['im'] + this['im'] * z['re']);\n  },\n  /**\r\n   * Divides two complex numbers\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'div': function (a, b) {\n    var z = new Complex(a, b);\n\n    // 0 / 0 = NaN and Infinity / Infinity = NaN\n    if (this['isZero']() && z['isZero']() || this['isInfinite']() && z['isInfinite']()) {\n      return Complex['NAN'];\n    }\n\n    // Infinity / 0 = Infinity\n    if (this['isInfinite']() || z['isZero']()) {\n      return Complex['INFINITY'];\n    }\n\n    // 0 / Infinity = 0\n    if (this['isZero']() || z['isInfinite']()) {\n      return Complex['ZERO'];\n    }\n    a = this['re'];\n    b = this['im'];\n    var c = z['re'];\n    var d = z['im'];\n    var t, x;\n    if (0 === d) {\n      // Divisor is real\n      return new Complex(a / c, b / c);\n    }\n    if (Math.abs(c) < Math.abs(d)) {\n      x = c / d;\n      t = c * x + d;\n      return new Complex((a * x + b) / t, (b * x - a) / t);\n    } else {\n      x = d / c;\n      t = d * x + c;\n      return new Complex((a + b * x) / t, (b - a * x) / t);\n    }\n  },\n  /**\r\n   * Calculate the power of two complex numbers\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'pow': function (a, b) {\n    var z = new Complex(a, b);\n    a = this['re'];\n    b = this['im'];\n    if (z['isZero']()) {\n      return Complex['ONE'];\n    }\n\n    // If the exponent is real\n    if (z['im'] === 0) {\n      if (b === 0) {\n        return new Complex(Math.pow(a, z['re']), 0);\n      } else if (a === 0) {\n        // If base is fully imaginary\n\n        switch ((z['re'] % 4 + 4) % 4) {\n          case 0:\n            return new Complex(Math.pow(b, z['re']), 0);\n          case 1:\n            return new Complex(0, Math.pow(b, z['re']));\n          case 2:\n            return new Complex(-Math.pow(b, z['re']), 0);\n          case 3:\n            return new Complex(0, -Math.pow(b, z['re']));\n        }\n      }\n    }\n\n    /* I couldn't find a good formula, so here is a derivation and optimization\r\n     *\r\n     * z_1^z_2 = (a + bi)^(c + di)\r\n     *         = exp((c + di) * log(a + bi)\r\n     *         = pow(a^2 + b^2, (c + di) / 2) * exp(i(c + di)atan2(b, a))\r\n     * =>...\r\n     * Re = (pow(a^2 + b^2, c / 2) * exp(-d * atan2(b, a))) * cos(d * log(a^2 + b^2) / 2 + c * atan2(b, a))\r\n     * Im = (pow(a^2 + b^2, c / 2) * exp(-d * atan2(b, a))) * sin(d * log(a^2 + b^2) / 2 + c * atan2(b, a))\r\n     *\r\n     * =>...\r\n     * Re = exp(c * log(sqrt(a^2 + b^2)) - d * atan2(b, a)) * cos(d * log(sqrt(a^2 + b^2)) + c * atan2(b, a))\r\n     * Im = exp(c * log(sqrt(a^2 + b^2)) - d * atan2(b, a)) * sin(d * log(sqrt(a^2 + b^2)) + c * atan2(b, a))\r\n     *\r\n     * =>\r\n     * Re = exp(c * logsq2 - d * arg(z_1)) * cos(d * logsq2 + c * arg(z_1))\r\n     * Im = exp(c * logsq2 - d * arg(z_1)) * sin(d * logsq2 + c * arg(z_1))\r\n     *\r\n     */\n\n    if (a === 0 && b === 0 && z['re'] > 0 && z['im'] >= 0) {\n      return Complex['ZERO'];\n    }\n    var arg = Math.atan2(b, a);\n    var loh = logHypot(a, b);\n    a = Math.exp(z['re'] * loh - z['im'] * arg);\n    b = z['im'] * loh + z['re'] * arg;\n    return new Complex(a * Math.cos(b), a * Math.sin(b));\n  },\n  /**\r\n   * Calculate the complex square root\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'sqrt': function () {\n    var a = this['re'];\n    var b = this['im'];\n    var r = this['abs']();\n    var re, im;\n    if (a >= 0) {\n      if (b === 0) {\n        return new Complex(Math.sqrt(a), 0);\n      }\n      re = 0.5 * Math.sqrt(2.0 * (r + a));\n    } else {\n      re = Math.abs(b) / Math.sqrt(2 * (r - a));\n    }\n    if (a <= 0) {\n      im = 0.5 * Math.sqrt(2.0 * (r - a));\n    } else {\n      im = Math.abs(b) / Math.sqrt(2 * (r + a));\n    }\n    return new Complex(re, b < 0 ? -im : im);\n  },\n  /**\r\n   * Calculate the complex exponent\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'exp': function () {\n    var tmp = Math.exp(this['re']);\n    if (this['im'] === 0) {\n      //return new Complex(tmp, 0);\n    }\n    return new Complex(tmp * Math.cos(this['im']), tmp * Math.sin(this['im']));\n  },\n  /**\r\n   * Calculate the complex exponent and subtracts one.\r\n   *\r\n   * This may be more accurate than `Complex(x).exp().sub(1)` if\r\n   * `x` is small.\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'expm1': function () {\n    /**\r\n     * exp(a + i*b) - 1\r\n     = exp(a) * (cos(b) + j*sin(b)) - 1\r\n     = expm1(a)*cos(b) + cosm1(b) + j*exp(a)*sin(b)\r\n     */\n\n    var a = this['re'];\n    var b = this['im'];\n    return new Complex(Math.expm1(a) * Math.cos(b) + cosm1(b), Math.exp(a) * Math.sin(b));\n  },\n  /**\r\n   * Calculate the natural log\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'log': function () {\n    var a = this['re'];\n    var b = this['im'];\n    if (b === 0 && a > 0) {\n      //return new Complex(Math.log(a), 0);\n    }\n    return new Complex(logHypot(a, b), Math.atan2(b, a));\n  },\n  /**\r\n   * Calculate the magnitude of the complex number\r\n   *\r\n   * @returns {number}\r\n   */\n  'abs': function () {\n    return hypot(this['re'], this['im']);\n  },\n  /**\r\n   * Calculate the angle of the complex number\r\n   *\r\n   * @returns {number}\r\n   */\n  'arg': function () {\n    return Math.atan2(this['im'], this['re']);\n  },\n  /**\r\n   * Calculate the sine of the complex number\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'sin': function () {\n    // sin(c) = (e^b - e^(-b)) / (2i)\n\n    var a = this['re'];\n    var b = this['im'];\n    return new Complex(Math.sin(a) * cosh(b), Math.cos(a) * sinh(b));\n  },\n  /**\r\n   * Calculate the cosine\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'cos': function () {\n    // cos(z) = (e^b + e^(-b)) / 2\n\n    var a = this['re'];\n    var b = this['im'];\n    return new Complex(Math.cos(a) * cosh(b), -Math.sin(a) * sinh(b));\n  },\n  /**\r\n   * Calculate the tangent\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'tan': function () {\n    // tan(c) = (e^(ci) - e^(-ci)) / (i(e^(ci) + e^(-ci)))\n\n    var a = 2 * this['re'];\n    var b = 2 * this['im'];\n    var d = Math.cos(a) + cosh(b);\n    return new Complex(Math.sin(a) / d, sinh(b) / d);\n  },\n  /**\r\n   * Calculate the cotangent\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'cot': function () {\n    // cot(c) = i(e^(ci) + e^(-ci)) / (e^(ci) - e^(-ci))\n\n    var a = 2 * this['re'];\n    var b = 2 * this['im'];\n    var d = Math.cos(a) - cosh(b);\n    return new Complex(-Math.sin(a) / d, sinh(b) / d);\n  },\n  /**\r\n   * Calculate the secant\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'sec': function () {\n    // sec(c) = 2 / (e^(ci) + e^(-ci))\n\n    var a = this['re'];\n    var b = this['im'];\n    var d = 0.5 * cosh(2 * b) + 0.5 * Math.cos(2 * a);\n    return new Complex(Math.cos(a) * cosh(b) / d, Math.sin(a) * sinh(b) / d);\n  },\n  /**\r\n   * Calculate the cosecans\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'csc': function () {\n    // csc(c) = 2i / (e^(ci) - e^(-ci))\n\n    var a = this['re'];\n    var b = this['im'];\n    var d = 0.5 * cosh(2 * b) - 0.5 * Math.cos(2 * a);\n    return new Complex(Math.sin(a) * cosh(b) / d, -Math.cos(a) * sinh(b) / d);\n  },\n  /**\r\n   * Calculate the complex arcus sinus\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'asin': function () {\n    // asin(c) = -i * log(ci + sqrt(1 - c^2))\n\n    var a = this['re'];\n    var b = this['im'];\n    var t1 = new Complex(b * b - a * a + 1, -2 * a * b)['sqrt']();\n    var t2 = new Complex(t1['re'] - b, t1['im'] + a)['log']();\n    return new Complex(t2['im'], -t2['re']);\n  },\n  /**\r\n   * Calculate the complex arcus cosinus\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'acos': function () {\n    // acos(c) = i * log(c - i * sqrt(1 - c^2))\n\n    var a = this['re'];\n    var b = this['im'];\n    var t1 = new Complex(b * b - a * a + 1, -2 * a * b)['sqrt']();\n    var t2 = new Complex(t1['re'] - b, t1['im'] + a)['log']();\n    return new Complex(Math.PI / 2 - t2['im'], t2['re']);\n  },\n  /**\r\n   * Calculate the complex arcus tangent\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'atan': function () {\n    // atan(c) = i / 2 log((i + x) / (i - x))\n\n    var a = this['re'];\n    var b = this['im'];\n    if (a === 0) {\n      if (b === 1) {\n        return new Complex(0, Infinity);\n      }\n      if (b === -1) {\n        return new Complex(0, -Infinity);\n      }\n    }\n    var d = a * a + (1.0 - b) * (1.0 - b);\n    var t1 = new Complex((1 - b * b - a * a) / d, -2 * a / d).log();\n    return new Complex(-0.5 * t1['im'], 0.5 * t1['re']);\n  },\n  /**\r\n   * Calculate the complex arcus cotangent\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'acot': function () {\n    // acot(c) = i / 2 log((c - i) / (c + i))\n\n    var a = this['re'];\n    var b = this['im'];\n    if (b === 0) {\n      return new Complex(Math.atan2(1, a), 0);\n    }\n    var d = a * a + b * b;\n    return d !== 0 ? new Complex(a / d, -b / d).atan() : new Complex(a !== 0 ? a / 0 : 0, b !== 0 ? -b / 0 : 0).atan();\n  },\n  /**\r\n   * Calculate the complex arcus secant\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'asec': function () {\n    // asec(c) = -i * log(1 / c + sqrt(1 - i / c^2))\n\n    var a = this['re'];\n    var b = this['im'];\n    if (a === 0 && b === 0) {\n      return new Complex(0, Infinity);\n    }\n    var d = a * a + b * b;\n    return d !== 0 ? new Complex(a / d, -b / d).acos() : new Complex(a !== 0 ? a / 0 : 0, b !== 0 ? -b / 0 : 0).acos();\n  },\n  /**\r\n   * Calculate the complex arcus cosecans\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'acsc': function () {\n    // acsc(c) = -i * log(i / c + sqrt(1 - 1 / c^2))\n\n    var a = this['re'];\n    var b = this['im'];\n    if (a === 0 && b === 0) {\n      return new Complex(Math.PI / 2, Infinity);\n    }\n    var d = a * a + b * b;\n    return d !== 0 ? new Complex(a / d, -b / d).asin() : new Complex(a !== 0 ? a / 0 : 0, b !== 0 ? -b / 0 : 0).asin();\n  },\n  /**\r\n   * Calculate the complex sinh\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'sinh': function () {\n    // sinh(c) = (e^c - e^-c) / 2\n\n    var a = this['re'];\n    var b = this['im'];\n    return new Complex(sinh(a) * Math.cos(b), cosh(a) * Math.sin(b));\n  },\n  /**\r\n   * Calculate the complex cosh\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'cosh': function () {\n    // cosh(c) = (e^c + e^-c) / 2\n\n    var a = this['re'];\n    var b = this['im'];\n    return new Complex(cosh(a) * Math.cos(b), sinh(a) * Math.sin(b));\n  },\n  /**\r\n   * Calculate the complex tanh\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'tanh': function () {\n    // tanh(c) = (e^c - e^-c) / (e^c + e^-c)\n\n    var a = 2 * this['re'];\n    var b = 2 * this['im'];\n    var d = cosh(a) + Math.cos(b);\n    return new Complex(sinh(a) / d, Math.sin(b) / d);\n  },\n  /**\r\n   * Calculate the complex coth\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'coth': function () {\n    // coth(c) = (e^c + e^-c) / (e^c - e^-c)\n\n    var a = 2 * this['re'];\n    var b = 2 * this['im'];\n    var d = cosh(a) - Math.cos(b);\n    return new Complex(sinh(a) / d, -Math.sin(b) / d);\n  },\n  /**\r\n   * Calculate the complex coth\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'csch': function () {\n    // csch(c) = 2 / (e^c - e^-c)\n\n    var a = this['re'];\n    var b = this['im'];\n    var d = Math.cos(2 * b) - cosh(2 * a);\n    return new Complex(-2 * sinh(a) * Math.cos(b) / d, 2 * cosh(a) * Math.sin(b) / d);\n  },\n  /**\r\n   * Calculate the complex sech\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'sech': function () {\n    // sech(c) = 2 / (e^c + e^-c)\n\n    var a = this['re'];\n    var b = this['im'];\n    var d = Math.cos(2 * b) + cosh(2 * a);\n    return new Complex(2 * cosh(a) * Math.cos(b) / d, -2 * sinh(a) * Math.sin(b) / d);\n  },\n  /**\r\n   * Calculate the complex asinh\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'asinh': function () {\n    // asinh(c) = log(c + sqrt(c^2 + 1))\n\n    var tmp = this['im'];\n    this['im'] = -this['re'];\n    this['re'] = tmp;\n    var res = this['asin']();\n    this['re'] = -this['im'];\n    this['im'] = tmp;\n    tmp = res['re'];\n    res['re'] = -res['im'];\n    res['im'] = tmp;\n    return res;\n  },\n  /**\r\n   * Calculate the complex acosh\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'acosh': function () {\n    // acosh(c) = log(c + sqrt(c^2 - 1))\n\n    var res = this['acos']();\n    if (res['im'] <= 0) {\n      var tmp = res['re'];\n      res['re'] = -res['im'];\n      res['im'] = tmp;\n    } else {\n      var tmp = res['im'];\n      res['im'] = -res['re'];\n      res['re'] = tmp;\n    }\n    return res;\n  },\n  /**\r\n   * Calculate the complex atanh\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'atanh': function () {\n    // atanh(c) = log((1+c) / (1-c)) / 2\n\n    var a = this['re'];\n    var b = this['im'];\n    var noIM = a > 1 && b === 0;\n    var oneMinus = 1 - a;\n    var onePlus = 1 + a;\n    var d = oneMinus * oneMinus + b * b;\n    var x = d !== 0 ? new Complex((onePlus * oneMinus - b * b) / d, (b * oneMinus + onePlus * b) / d) : new Complex(a !== -1 ? a / 0 : 0, b !== 0 ? b / 0 : 0);\n    var temp = x['re'];\n    x['re'] = logHypot(x['re'], x['im']) / 2;\n    x['im'] = Math.atan2(x['im'], temp) / 2;\n    if (noIM) {\n      x['im'] = -x['im'];\n    }\n    return x;\n  },\n  /**\r\n   * Calculate the complex acoth\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'acoth': function () {\n    // acoth(c) = log((c+1) / (c-1)) / 2\n\n    var a = this['re'];\n    var b = this['im'];\n    if (a === 0 && b === 0) {\n      return new Complex(0, Math.PI / 2);\n    }\n    var d = a * a + b * b;\n    return d !== 0 ? new Complex(a / d, -b / d).atanh() : new Complex(a !== 0 ? a / 0 : 0, b !== 0 ? -b / 0 : 0).atanh();\n  },\n  /**\r\n   * Calculate the complex acsch\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'acsch': function () {\n    // acsch(c) = log((1+sqrt(1+c^2))/c)\n\n    var a = this['re'];\n    var b = this['im'];\n    if (b === 0) {\n      return new Complex(a !== 0 ? Math.log(a + Math.sqrt(a * a + 1)) : Infinity, 0);\n    }\n    var d = a * a + b * b;\n    return d !== 0 ? new Complex(a / d, -b / d).asinh() : new Complex(a !== 0 ? a / 0 : 0, b !== 0 ? -b / 0 : 0).asinh();\n  },\n  /**\r\n   * Calculate the complex asech\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'asech': function () {\n    // asech(c) = log((1+sqrt(1-c^2))/c)\n\n    var a = this['re'];\n    var b = this['im'];\n    if (this['isZero']()) {\n      return Complex['INFINITY'];\n    }\n    var d = a * a + b * b;\n    return d !== 0 ? new Complex(a / d, -b / d).acosh() : new Complex(a !== 0 ? a / 0 : 0, b !== 0 ? -b / 0 : 0).acosh();\n  },\n  /**\r\n   * Calculate the complex inverse 1/z\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'inverse': function () {\n    // 1 / 0 = Infinity and 1 / Infinity = 0\n    if (this['isZero']()) {\n      return Complex['INFINITY'];\n    }\n    if (this['isInfinite']()) {\n      return Complex['ZERO'];\n    }\n    var a = this['re'];\n    var b = this['im'];\n    var d = a * a + b * b;\n    return new Complex(a / d, -b / d);\n  },\n  /**\r\n   * Returns the complex conjugate\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'conjugate': function () {\n    return new Complex(this['re'], -this['im']);\n  },\n  /**\r\n   * Gets the negated complex number\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'neg': function () {\n    return new Complex(-this['re'], -this['im']);\n  },\n  /**\r\n   * Ceils the actual complex number\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'ceil': function (places) {\n    places = Math.pow(10, places || 0);\n    return new Complex(Math.ceil(this['re'] * places) / places, Math.ceil(this['im'] * places) / places);\n  },\n  /**\r\n   * Floors the actual complex number\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'floor': function (places) {\n    places = Math.pow(10, places || 0);\n    return new Complex(Math.floor(this['re'] * places) / places, Math.floor(this['im'] * places) / places);\n  },\n  /**\r\n   * Ceils the actual complex number\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'round': function (places) {\n    places = Math.pow(10, places || 0);\n    return new Complex(Math.round(this['re'] * places) / places, Math.round(this['im'] * places) / places);\n  },\n  /**\r\n   * Compares two complex numbers\r\n   *\r\n   * **Note:** new Complex(Infinity).equals(Infinity) === false\r\n   *\r\n   * @returns {boolean}\r\n   */\n  'equals': function (a, b) {\n    var z = new Complex(a, b);\n    return Math.abs(z['re'] - this['re']) <= Complex['EPSILON'] && Math.abs(z['im'] - this['im']) <= Complex['EPSILON'];\n  },\n  /**\r\n   * Clones the actual object\r\n   *\r\n   * @returns {Complex}\r\n   */\n  'clone': function () {\n    return new Complex(this['re'], this['im']);\n  },\n  /**\r\n   * Gets a string of the actual complex number\r\n   *\r\n   * @returns {string}\r\n   */\n  'toString': function () {\n    var a = this['re'];\n    var b = this['im'];\n    var ret = \"\";\n    if (this['isNaN']()) {\n      return 'NaN';\n    }\n    if (this['isInfinite']()) {\n      return 'Infinity';\n    }\n\n    // If is real number\n    if (b === 0) {\n      return ret + a;\n    }\n    if (a !== 0) {\n      ret += a;\n      ret += \" \";\n      if (b < 0) {\n        b = -b;\n        ret += \"-\";\n      } else {\n        ret += \"+\";\n      }\n      ret += \" \";\n    } else if (b < 0) {\n      b = -b;\n      ret += \"-\";\n    }\n    if (1 !== b) {\n      // b is the absolute imaginary part\n      ret += b;\n    }\n    return ret + \"i\";\n  },\n  /**\r\n   * Returns the actual number as a vector\r\n   *\r\n   * @returns {Array}\r\n   */\n  'toVector': function () {\n    return [this['re'], this['im']];\n  },\n  /**\r\n   * Returns the actual real value of the current object\r\n   *\r\n   * @returns {number|null}\r\n   */\n  'valueOf': function () {\n    if (this['im'] === 0) {\n      return this['re'];\n    }\n    return null;\n  },\n  /**\r\n   * Determines whether a complex number is not on the Riemann sphere.\r\n   *\r\n   * @returns {boolean}\r\n   */\n  'isNaN': function () {\n    return isNaN(this['re']) || isNaN(this['im']);\n  },\n  /**\r\n   * Determines whether or not a complex number is at the zero pole of the\r\n   * Riemann sphere.\r\n   *\r\n   * @returns {boolean}\r\n   */\n  'isZero': function () {\n    return this['im'] === 0 && this['re'] === 0;\n  },\n  /**\r\n   * Determines whether a complex number is not at the infinity pole of the\r\n   * Riemann sphere.\r\n   *\r\n   * @returns {boolean}\r\n   */\n  'isFinite': function () {\n    return isFinite(this['re']) && isFinite(this['im']);\n  },\n  /**\r\n   * Determines whether or not a complex number is at the infinity pole of the\r\n   * Riemann sphere.\r\n   *\r\n   * @returns {boolean}\r\n   */\n  'isInfinite': function () {\n    return !(this['isNaN']() || this['isFinite']());\n  }\n};\nComplex['ZERO'] = new Complex(0, 0);\nComplex['ONE'] = new Complex(1, 0);\nComplex['I'] = new Complex(0, 1);\nComplex['PI'] = new Complex(Math.PI, 0);\nComplex['E'] = new Complex(Math.E, 0);\nComplex['INFINITY'] = new Complex(Infinity, Infinity);\nComplex['NAN'] = new Complex(NaN, NaN);\nComplex['EPSILON'] = 1e-16;\n\n// Since no need to customize the export in React, we can just export the class directly\n\n// if (typeof define === 'function' && define['amd']) {\n//   define([], function() {\n//     return Complex;\n//   });\n// } else if (typeof exports === 'object') {\n//   Object.defineProperty(Complex, \"__esModule\", {'value': true});\n//   Complex['default'] = Complex;\n//   Complex['Complex'] = Complex;\n//   module['exports'] = Complex;\n// } else {\n//   root['Complex'] = Complex;\n// }\n\nexport { Complex };\nvar _c;\n$RefreshReg$(_c, \"Complex\");","map":{"version":3,"names":["cosh","x","Math","exp","sinh","cosm1","limit","PI","cos","xx","hypot","y","a","abs","b","sqrt","parser_exit","SyntaxError","logHypot","_a","_b","log","atan2","parse","z","undefined","Number","isFinite","Complex","sin","length","tokens","match","plus","minus","i","c","isNaN","parseFloat","_c","prototype","sign","add","sub","mul","div","d","t","pow","arg","loh","r","re","im","tmp","expm1","tan","cot","sec","csc","asin","t1","t2","acos","atan","Infinity","acot","asec","acsc","tanh","coth","csch","sech","asinh","res","acosh","atanh","noIM","oneMinus","onePlus","temp","acoth","acsch","asech","inverse","conjugate","neg","ceil","places","floor","round","equals","clone","toString","ret","toVector","valueOf","isZero","isInfinite","E","NaN","$RefreshReg$"],"sources":["D:/Project/UC_Trains_Voice/react-demo/src/gavt/Wave/lib/complex.jsx"],"sourcesContent":["/**\r\n * @license Complex.js v2.0.12 11/02/2016\r\n *\r\n * Copyright (c) 2016, Robert Eisele (robert@xarg.org)\r\n * Dual licensed under the MIT or GPL Version 2 licenses.\r\n **/\r\n\r\n/**\r\n *\r\n * This class allows the manipulation of complex numbers.\r\n * You can pass a complex number in different formats. Either as object, double, string or two integer parameters.\r\n *\r\n * Object form\r\n * { re: <real>, im: <imaginary> }\r\n * { arg: <angle>, abs: <radius> }\r\n * { phi: <angle>, r: <radius> }\r\n *\r\n * Array / Vector form\r\n * [ real, imaginary ]\r\n *\r\n * Double form\r\n * 99.3 - Single double value\r\n *\r\n * String form\r\n * '23.1337' - Simple real number\r\n * '15+3i' - a simple complex number\r\n * '3-i' - a simple complex number\r\n *\r\n * Example:\r\n *\r\n * var c = new Complex('99.3+8i');\r\n * c.mul({r: 3, i: 9}).div(4.9).sub(3, 2);\r\n *\r\n */\r\n\r\n'use strict';\r\n  \r\nvar cosh = function(x) {\r\n  return (Math.exp(x) + Math.exp(-x)) * 0.5;\r\n};\r\n\r\nvar sinh = function(x) {\r\n  return (Math.exp(x) - Math.exp(-x)) * 0.5;\r\n};\r\n\r\n/**\r\n * Calculates cos(x) - 1 using Taylor series if x is small.\r\n *\r\n * @param {number} x\r\n * @returns {number} cos(x) - 1\r\n */\r\n\r\nvar cosm1 = function(x) {\r\n  var limit = Math.PI/4;\r\n  if (x < -limit || x > limit) {\r\n    return (Math.cos(x) - 1.0);\r\n  }\r\n\r\n  var xx = x * x;\r\n  return xx *\r\n    (-0.5 + xx *\r\n      (1/24 + xx *\r\n        (-1/720 + xx *\r\n          (1/40320 + xx *\r\n            (-1/3628800 + xx *\r\n              (1/4790014600 + xx *\r\n                (-1/87178291200 + xx *\r\n                  (1/20922789888000)\r\n                )\r\n              )\r\n            )\r\n          )\r\n        )\r\n      )\r\n    )\r\n};\r\n\r\nvar hypot = function(x, y) {\r\n\r\n  var a = Math.abs(x);\r\n  var b = Math.abs(y);\r\n\r\n  if (a < 3000 && b < 3000) {\r\n    return Math.sqrt(a * a + b * b);\r\n  }\r\n\r\n  if (a < b) {\r\n    a = b;\r\n    b = x / y;\r\n  } else {\r\n    b = y / x;\r\n  }\r\n  return a * Math.sqrt(1 + b * b);\r\n};\r\n\r\nvar parser_exit = function() {\r\n  throw SyntaxError('Invalid Param');\r\n};\r\n\r\n/**\r\n * Calculates log(sqrt(a^2+b^2)) in a way to avoid overflows\r\n *\r\n * @param {number} a\r\n * @param {number} b\r\n * @returns {number}\r\n */\r\nfunction logHypot(a, b) {\r\n\r\n  var _a = Math.abs(a);\r\n  var _b = Math.abs(b);\r\n\r\n  if (a === 0) {\r\n    return Math.log(_b);\r\n  }\r\n\r\n  if (b === 0) {\r\n    return Math.log(_a);\r\n  }\r\n\r\n  if (_a < 3000 && _b < 3000) {\r\n    return Math.log(a * a + b * b) * 0.5;\r\n  }\r\n\r\n  /* I got 4 ideas to compute this property without overflow:\r\n   *\r\n   * Testing 1000000 times with random samples for a,b ∈ [1, 1000000000] against a big decimal library to get an error estimate\r\n   *\r\n   * 1. Only eliminate the square root: (OVERALL ERROR: 3.9122483030951116e-11)\r\n\r\n   Math.log(a * a + b * b) / 2\r\n\r\n   *\r\n   *\r\n   * 2. Try to use the non-overflowing pythagoras: (OVERALL ERROR: 8.889760039210159e-10)\r\n\r\n   var fn = function(a, b) {\r\n   a = Math.abs(a);\r\n   b = Math.abs(b);\r\n   var t = Math.min(a, b);\r\n   a = Math.max(a, b);\r\n   t = t / a;\r\n\r\n   return Math.log(a) + Math.log(1 + t * t) / 2;\r\n   };\r\n\r\n   * 3. Abuse the identity cos(atan(y/x) = x / sqrt(x^2+y^2): (OVERALL ERROR: 3.4780178737037204e-10)\r\n\r\n   Math.log(a / Math.cos(Math.atan2(b, a)))\r\n\r\n   * 4. Use 3. and apply log rules: (OVERALL ERROR: 1.2014087502620896e-9)\r\n\r\n   Math.log(a) - Math.log(Math.cos(Math.atan2(b, a)))\r\n\r\n   */\r\n\r\n  return Math.log(a / Math.cos(Math.atan2(b, a)));\r\n}\r\n\r\nvar parse = function(a, b) {\r\n\r\n  var z = {'re': 0, 'im': 0};\r\n\r\n  if (a === undefined || a === null) {\r\n    z['re'] =\r\n            z['im'] = 0;\r\n  } else if (b !== undefined) {\r\n    z['re'] = a;\r\n    z['im'] = b;\r\n  } else\r\n    switch (typeof a) {\r\n\r\n      case 'object':\r\n\r\n        if ('im' in a && 're' in a) {\r\n          z['re'] = a['re'];\r\n          z['im'] = a['im'];\r\n        } else if ('abs' in a && 'arg' in a) {\r\n          if (!Number.isFinite(a['abs']) && Number.isFinite(a['arg'])) {\r\n            return Complex['INFINITY'];\r\n          }\r\n          z['re'] = a['abs'] * Math.cos(a['arg']);\r\n          z['im'] = a['abs'] * Math.sin(a['arg']);\r\n        } else if ('r' in a && 'phi' in a) {\r\n          if (!Number.isFinite(a['r']) && Number.isFinite(a['phi'])) {\r\n            return Complex['INFINITY'];\r\n          }\r\n          z['re'] = a['r'] * Math.cos(a['phi']);\r\n          z['im'] = a['r'] * Math.sin(a['phi']);\r\n        } else if (a.length === 2) { // Quick array check\r\n          z['re'] = a[0];\r\n          z['im'] = a[1];\r\n        } else {\r\n          parser_exit();\r\n        }\r\n        break;\r\n\r\n      case 'string':\r\n\r\n        z['im'] = /* void */\r\n                z['re'] = 0;\r\n\r\n        var tokens = a.match(/\\d+\\.?\\d*e[+-]?\\d+|\\d+\\.?\\d*|\\.\\d+|./g);\r\n        var plus = 1;\r\n        var minus = 0;\r\n\r\n        if (tokens === null) {\r\n          parser_exit();\r\n        }\r\n\r\n        for (var i = 0; i < tokens.length; i++) {\r\n\r\n          var c = tokens[i];\r\n\r\n          if (c === ' ' || c === '\\t' || c === '\\n') {\r\n            /* void */\r\n          } else if (c === '+') {\r\n            plus++;\r\n          } else if (c === '-') {\r\n            minus++;\r\n          } else if (c === 'i' || c === 'I') {\r\n\r\n            if (plus + minus === 0) {\r\n              parser_exit();\r\n            }\r\n\r\n            if (tokens[i + 1] !== ' ' && !isNaN(tokens[i + 1])) {\r\n              z['im'] += parseFloat((minus % 2 ? '-' : '') + tokens[i + 1]);\r\n              i++;\r\n            } else {\r\n              z['im'] += parseFloat((minus % 2 ? '-' : '') + '1');\r\n            }\r\n            plus = minus = 0;\r\n\r\n          } else {\r\n\r\n            if (plus + minus === 0 || isNaN(c)) {\r\n              parser_exit();\r\n            }\r\n\r\n            if (tokens[i + 1] === 'i' || tokens[i + 1] === 'I') {\r\n              z['im'] += parseFloat((minus % 2 ? '-' : '') + c);\r\n              i++;\r\n            } else {\r\n              z['re'] += parseFloat((minus % 2 ? '-' : '') + c);\r\n            }\r\n            plus = minus = 0;\r\n          }\r\n        }\r\n\r\n        // Still something on the stack\r\n        if (plus + minus > 0) {\r\n          parser_exit();\r\n        }\r\n        break;\r\n\r\n      case 'number':\r\n        z['im'] = 0;\r\n        z['re'] = a;\r\n        break;\r\n\r\n      default:\r\n        parser_exit();\r\n    }\r\n\r\n  if (isNaN(z['re']) || isNaN(z['im'])) {\r\n    // If a calculation is NaN, we treat it as NaN and don't throw\r\n    //parser_exit();\r\n  }\r\n\r\n  return z;\r\n};\r\n\r\n/**\r\n * @constructor\r\n * @returns {Complex}\r\n */\r\nfunction Complex(a, b) {\r\n\r\n  if (!(this instanceof Complex)) {\r\n    return new Complex(a, b);\r\n  }\r\n\r\n  var z = parse(a, b);\r\n\r\n  this['re'] = z['re'];\r\n  this['im'] = z['im'];\r\n}\r\n\r\nComplex.prototype = {\r\n\r\n  're': 0,\r\n  'im': 0,\r\n\r\n  /**\r\n   * Calculates the sign of a complex number, which is a normalized complex\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'sign': function() {\r\n\r\n    var abs = this['abs']();\r\n\r\n    return new Complex(\r\n            this['re'] / abs,\r\n            this['im'] / abs);\r\n  },\r\n\r\n  /**\r\n   * Adds two complex numbers\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'add': function(a, b) {\r\n\r\n    var z = new Complex(a, b);\r\n\r\n    // Infinity + Infinity = NaN\r\n    if (this['isInfinite']() && z['isInfinite']()) {\r\n      return Complex['NAN'];\r\n    }\r\n\r\n    // Infinity + z = Infinity { where z != Infinity }\r\n    if (this['isInfinite']() || z['isInfinite']()) {\r\n      return Complex['INFINITY'];\r\n    }\r\n\r\n    return new Complex(\r\n            this['re'] + z['re'],\r\n            this['im'] + z['im']);\r\n  },\r\n\r\n  /**\r\n   * Subtracts two complex numbers\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'sub': function(a, b) {\r\n\r\n    var z = new Complex(a, b);\r\n\r\n    // Infinity - Infinity = NaN\r\n    if (this['isInfinite']() && z['isInfinite']()) {\r\n      return Complex['NAN'];\r\n    }\r\n\r\n    // Infinity - z = Infinity { where z != Infinity }\r\n    if (this['isInfinite']() || z['isInfinite']()) {\r\n      return Complex['INFINITY'];\r\n    }\r\n\r\n    return new Complex(\r\n            this['re'] - z['re'],\r\n            this['im'] - z['im']);\r\n  },\r\n\r\n  /**\r\n   * Multiplies two complex numbers\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'mul': function(a, b) {\r\n\r\n    var z = new Complex(a, b);\r\n\r\n    // Infinity * 0 = NaN\r\n    if ((this['isInfinite']() && z['isZero']()) || (this['isZero']() && z['isInfinite']())) {\r\n      return Complex['NAN'];\r\n    }\r\n\r\n    // Infinity * z = Infinity { where z != 0 }\r\n    if (this['isInfinite']() || z['isInfinite']()) {\r\n      return Complex['INFINITY'];\r\n    }\r\n\r\n    // Short circuit for real values\r\n    if (z['im'] === 0 && this['im'] === 0) {\r\n      return new Complex(this['re'] * z['re'], 0);\r\n    }\r\n\r\n    return new Complex(\r\n            this['re'] * z['re'] - this['im'] * z['im'],\r\n            this['re'] * z['im'] + this['im'] * z['re']);\r\n  },\r\n\r\n  /**\r\n   * Divides two complex numbers\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'div': function(a, b) {\r\n\r\n    var z = new Complex(a, b);\r\n\r\n    // 0 / 0 = NaN and Infinity / Infinity = NaN\r\n    if ((this['isZero']() && z['isZero']()) || (this['isInfinite']() && z['isInfinite']())) {\r\n      return Complex['NAN'];\r\n    }\r\n\r\n    // Infinity / 0 = Infinity\r\n    if (this['isInfinite']() || z['isZero']()) {\r\n      return Complex['INFINITY'];\r\n    }\r\n\r\n    // 0 / Infinity = 0\r\n    if (this['isZero']() || z['isInfinite']()) {\r\n      return Complex['ZERO'];\r\n    }\r\n\r\n    a = this['re'];\r\n    b = this['im'];\r\n\r\n    var c = z['re'];\r\n    var d = z['im'];\r\n    var t, x;\r\n\r\n    if (0 === d) {\r\n      // Divisor is real\r\n      return new Complex(a / c, b / c);\r\n    }\r\n\r\n    if (Math.abs(c) < Math.abs(d)) {\r\n\r\n      x = c / d;\r\n      t = c * x + d;\r\n\r\n      return new Complex(\r\n              (a * x + b) / t,\r\n              (b * x - a) / t);\r\n\r\n    } else {\r\n\r\n      x = d / c;\r\n      t = d * x + c;\r\n\r\n      return new Complex(\r\n              (a + b * x) / t,\r\n              (b - a * x) / t);\r\n    }\r\n  },\r\n\r\n  /**\r\n   * Calculate the power of two complex numbers\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'pow': function(a, b) {\r\n\r\n    var z = new Complex(a, b);\r\n\r\n    a = this['re'];\r\n    b = this['im'];\r\n\r\n    if (z['isZero']()) {\r\n      return Complex['ONE'];\r\n    }\r\n\r\n    // If the exponent is real\r\n    if (z['im'] === 0) {\r\n\r\n      if (b === 0) {\r\n\r\n        return new Complex(Math.pow(a, z['re']), 0);\r\n\r\n      } else if (a === 0) { // If base is fully imaginary\r\n\r\n        switch ((z['re'] % 4 + 4) % 4) {\r\n          case 0:\r\n            return new Complex(Math.pow(b, z['re']), 0);\r\n          case 1:\r\n            return new Complex(0, Math.pow(b, z['re']));\r\n          case 2:\r\n            return new Complex(-Math.pow(b, z['re']), 0);\r\n          case 3:\r\n            return new Complex(0, -Math.pow(b, z['re']));\r\n        }\r\n      }\r\n    }\r\n\r\n    /* I couldn't find a good formula, so here is a derivation and optimization\r\n     *\r\n     * z_1^z_2 = (a + bi)^(c + di)\r\n     *         = exp((c + di) * log(a + bi)\r\n     *         = pow(a^2 + b^2, (c + di) / 2) * exp(i(c + di)atan2(b, a))\r\n     * =>...\r\n     * Re = (pow(a^2 + b^2, c / 2) * exp(-d * atan2(b, a))) * cos(d * log(a^2 + b^2) / 2 + c * atan2(b, a))\r\n     * Im = (pow(a^2 + b^2, c / 2) * exp(-d * atan2(b, a))) * sin(d * log(a^2 + b^2) / 2 + c * atan2(b, a))\r\n     *\r\n     * =>...\r\n     * Re = exp(c * log(sqrt(a^2 + b^2)) - d * atan2(b, a)) * cos(d * log(sqrt(a^2 + b^2)) + c * atan2(b, a))\r\n     * Im = exp(c * log(sqrt(a^2 + b^2)) - d * atan2(b, a)) * sin(d * log(sqrt(a^2 + b^2)) + c * atan2(b, a))\r\n     *\r\n     * =>\r\n     * Re = exp(c * logsq2 - d * arg(z_1)) * cos(d * logsq2 + c * arg(z_1))\r\n     * Im = exp(c * logsq2 - d * arg(z_1)) * sin(d * logsq2 + c * arg(z_1))\r\n     *\r\n     */\r\n\r\n    if (a === 0 && b === 0 && z['re'] > 0 && z['im'] >= 0) {\r\n      return Complex['ZERO'];\r\n    }\r\n\r\n    var arg = Math.atan2(b, a);\r\n    var loh = logHypot(a, b);\r\n\r\n    a = Math.exp(z['re'] * loh - z['im'] * arg);\r\n    b = z['im'] * loh + z['re'] * arg;\r\n    return new Complex(\r\n            a * Math.cos(b),\r\n            a * Math.sin(b));\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex square root\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'sqrt': function() {\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n    var r = this['abs']();\r\n\r\n    var re, im;\r\n\r\n    if (a >= 0) {\r\n\r\n      if (b === 0) {\r\n        return new Complex(Math.sqrt(a), 0);\r\n      }\r\n\r\n      re = 0.5 * Math.sqrt(2.0 * (r + a));\r\n    } else {\r\n      re = Math.abs(b) / Math.sqrt(2 * (r - a));\r\n    }\r\n\r\n    if (a <= 0) {\r\n      im = 0.5 * Math.sqrt(2.0 * (r - a));\r\n    } else {\r\n      im = Math.abs(b) / Math.sqrt(2 * (r + a));\r\n    }\r\n\r\n    return new Complex(re, b < 0 ? -im : im);\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex exponent\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'exp': function() {\r\n\r\n    var tmp = Math.exp(this['re']);\r\n\r\n    if (this['im'] === 0) {\r\n      //return new Complex(tmp, 0);\r\n    }\r\n    return new Complex(\r\n            tmp * Math.cos(this['im']),\r\n            tmp * Math.sin(this['im']));\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex exponent and subtracts one.\r\n   *\r\n   * This may be more accurate than `Complex(x).exp().sub(1)` if\r\n   * `x` is small.\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'expm1': function() {\r\n\r\n    /**\r\n     * exp(a + i*b) - 1\r\n     = exp(a) * (cos(b) + j*sin(b)) - 1\r\n     = expm1(a)*cos(b) + cosm1(b) + j*exp(a)*sin(b)\r\n     */\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    return new Complex(\r\n            Math.expm1(a) * Math.cos(b) + cosm1(b),\r\n            Math.exp(a) * Math.sin(b));\r\n  },\r\n\r\n  /**\r\n   * Calculate the natural log\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'log': function() {\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    if (b === 0 && a > 0) {\r\n      //return new Complex(Math.log(a), 0);\r\n    }\r\n\r\n    return new Complex(\r\n            logHypot(a, b),\r\n            Math.atan2(b, a));\r\n  },\r\n\r\n  /**\r\n   * Calculate the magnitude of the complex number\r\n   *\r\n   * @returns {number}\r\n   */\r\n  'abs': function() {\r\n\r\n    return hypot(this['re'], this['im']);\r\n  },\r\n\r\n  /**\r\n   * Calculate the angle of the complex number\r\n   *\r\n   * @returns {number}\r\n   */\r\n  'arg': function() {\r\n\r\n    return Math.atan2(this['im'], this['re']);\r\n  },\r\n\r\n  /**\r\n   * Calculate the sine of the complex number\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'sin': function() {\r\n\r\n    // sin(c) = (e^b - e^(-b)) / (2i)\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    return new Complex(\r\n            Math.sin(a) * cosh(b),\r\n            Math.cos(a) * sinh(b));\r\n  },\r\n\r\n  /**\r\n   * Calculate the cosine\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'cos': function() {\r\n\r\n    // cos(z) = (e^b + e^(-b)) / 2\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    return new Complex(\r\n            Math.cos(a) * cosh(b),\r\n            -Math.sin(a) * sinh(b));\r\n  },\r\n\r\n  /**\r\n   * Calculate the tangent\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'tan': function() {\r\n\r\n    // tan(c) = (e^(ci) - e^(-ci)) / (i(e^(ci) + e^(-ci)))\r\n\r\n    var a = 2 * this['re'];\r\n    var b = 2 * this['im'];\r\n    var d = Math.cos(a) + cosh(b);\r\n\r\n    return new Complex(\r\n            Math.sin(a) / d,\r\n            sinh(b) / d);\r\n  },\r\n\r\n  /**\r\n   * Calculate the cotangent\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'cot': function() {\r\n\r\n    // cot(c) = i(e^(ci) + e^(-ci)) / (e^(ci) - e^(-ci))\r\n\r\n    var a = 2 * this['re'];\r\n    var b = 2 * this['im'];\r\n    var d = Math.cos(a) - cosh(b);\r\n\r\n    return new Complex(\r\n            -Math.sin(a) / d,\r\n            sinh(b) / d);\r\n  },\r\n\r\n  /**\r\n   * Calculate the secant\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'sec': function() {\r\n\r\n    // sec(c) = 2 / (e^(ci) + e^(-ci))\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n    var d = 0.5 * cosh(2 * b) + 0.5 * Math.cos(2 * a);\r\n\r\n    return new Complex(\r\n            Math.cos(a) * cosh(b) / d,\r\n            Math.sin(a) * sinh(b) / d);\r\n  },\r\n\r\n  /**\r\n   * Calculate the cosecans\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'csc': function() {\r\n\r\n    // csc(c) = 2i / (e^(ci) - e^(-ci))\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n    var d = 0.5 * cosh(2 * b) - 0.5 * Math.cos(2 * a);\r\n\r\n    return new Complex(\r\n            Math.sin(a) * cosh(b) / d,\r\n            -Math.cos(a) * sinh(b) / d);\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex arcus sinus\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'asin': function() {\r\n\r\n    // asin(c) = -i * log(ci + sqrt(1 - c^2))\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    var t1 = new Complex(\r\n            b * b - a * a + 1,\r\n            -2 * a * b)['sqrt']();\r\n\r\n    var t2 = new Complex(\r\n            t1['re'] - b,\r\n            t1['im'] + a)['log']();\r\n\r\n    return new Complex(t2['im'], -t2['re']);\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex arcus cosinus\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'acos': function() {\r\n\r\n    // acos(c) = i * log(c - i * sqrt(1 - c^2))\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    var t1 = new Complex(\r\n            b * b - a * a + 1,\r\n            -2 * a * b)['sqrt']();\r\n\r\n    var t2 = new Complex(\r\n            t1['re'] - b,\r\n            t1['im'] + a)['log']();\r\n\r\n    return new Complex(Math.PI / 2 - t2['im'], t2['re']);\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex arcus tangent\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'atan': function() {\r\n\r\n    // atan(c) = i / 2 log((i + x) / (i - x))\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    if (a === 0) {\r\n\r\n      if (b === 1) {\r\n        return new Complex(0, Infinity);\r\n      }\r\n\r\n      if (b === -1) {\r\n        return new Complex(0, -Infinity);\r\n      }\r\n    }\r\n\r\n    var d = a * a + (1.0 - b) * (1.0 - b);\r\n\r\n    var t1 = new Complex(\r\n            (1 - b * b - a * a) / d,\r\n            -2 * a / d).log();\r\n\r\n    return new Complex(-0.5 * t1['im'], 0.5 * t1['re']);\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex arcus cotangent\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'acot': function() {\r\n\r\n    // acot(c) = i / 2 log((c - i) / (c + i))\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    if (b === 0) {\r\n      return new Complex(Math.atan2(1, a), 0);\r\n    }\r\n\r\n    var d = a * a + b * b;\r\n    return (d !== 0)\r\n            ? new Complex(\r\n                    a / d,\r\n                    -b / d).atan()\r\n            : new Complex(\r\n                    (a !== 0) ? a / 0 : 0,\r\n                    (b !== 0) ? -b / 0 : 0).atan();\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex arcus secant\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'asec': function() {\r\n\r\n    // asec(c) = -i * log(1 / c + sqrt(1 - i / c^2))\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    if (a === 0 && b === 0) {\r\n      return new Complex(0, Infinity);\r\n    }\r\n\r\n    var d = a * a + b * b;\r\n    return (d !== 0)\r\n            ? new Complex(\r\n                    a / d,\r\n                    -b / d).acos()\r\n            : new Complex(\r\n                    (a !== 0) ? a / 0 : 0,\r\n                    (b !== 0) ? -b / 0 : 0).acos();\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex arcus cosecans\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'acsc': function() {\r\n\r\n    // acsc(c) = -i * log(i / c + sqrt(1 - 1 / c^2))\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    if (a === 0 && b === 0) {\r\n      return new Complex(Math.PI / 2, Infinity);\r\n    }\r\n\r\n    var d = a * a + b * b;\r\n    return (d !== 0)\r\n            ? new Complex(\r\n                    a / d,\r\n                    -b / d).asin()\r\n            : new Complex(\r\n                    (a !== 0) ? a / 0 : 0,\r\n                    (b !== 0) ? -b / 0 : 0).asin();\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex sinh\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'sinh': function() {\r\n\r\n    // sinh(c) = (e^c - e^-c) / 2\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    return new Complex(\r\n            sinh(a) * Math.cos(b),\r\n            cosh(a) * Math.sin(b));\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex cosh\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'cosh': function() {\r\n\r\n    // cosh(c) = (e^c + e^-c) / 2\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    return new Complex(\r\n            cosh(a) * Math.cos(b),\r\n            sinh(a) * Math.sin(b));\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex tanh\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'tanh': function() {\r\n\r\n    // tanh(c) = (e^c - e^-c) / (e^c + e^-c)\r\n\r\n    var a = 2 * this['re'];\r\n    var b = 2 * this['im'];\r\n    var d = cosh(a) + Math.cos(b);\r\n\r\n    return new Complex(\r\n            sinh(a) / d,\r\n            Math.sin(b) / d);\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex coth\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'coth': function() {\r\n\r\n    // coth(c) = (e^c + e^-c) / (e^c - e^-c)\r\n\r\n    var a = 2 * this['re'];\r\n    var b = 2 * this['im'];\r\n    var d = cosh(a) - Math.cos(b);\r\n\r\n    return new Complex(\r\n            sinh(a) / d,\r\n            -Math.sin(b) / d);\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex coth\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'csch': function() {\r\n\r\n    // csch(c) = 2 / (e^c - e^-c)\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n    var d = Math.cos(2 * b) - cosh(2 * a);\r\n\r\n    return new Complex(\r\n            -2 * sinh(a) * Math.cos(b) / d,\r\n            2 * cosh(a) * Math.sin(b) / d);\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex sech\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'sech': function() {\r\n\r\n    // sech(c) = 2 / (e^c + e^-c)\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n    var d = Math.cos(2 * b) + cosh(2 * a);\r\n\r\n    return new Complex(\r\n            2 * cosh(a) * Math.cos(b) / d,\r\n            -2 * sinh(a) * Math.sin(b) / d);\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex asinh\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'asinh': function() {\r\n\r\n    // asinh(c) = log(c + sqrt(c^2 + 1))\r\n\r\n    var tmp = this['im'];\r\n    this['im'] = -this['re'];\r\n    this['re'] = tmp;\r\n    var res = this['asin']();\r\n\r\n    this['re'] = -this['im'];\r\n    this['im'] = tmp;\r\n    tmp = res['re'];\r\n\r\n    res['re'] = -res['im'];\r\n    res['im'] = tmp;\r\n    return res;\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex acosh\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'acosh': function() {\r\n\r\n    // acosh(c) = log(c + sqrt(c^2 - 1))\r\n\r\n    var res = this['acos']();\r\n    if (res['im'] <= 0) {\r\n      var tmp = res['re'];\r\n      res['re'] = -res['im'];\r\n      res['im'] = tmp;\r\n    } else {\r\n      var tmp = res['im'];\r\n      res['im'] = -res['re'];\r\n      res['re'] = tmp;\r\n    }\r\n    return res;\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex atanh\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'atanh': function() {\r\n\r\n    // atanh(c) = log((1+c) / (1-c)) / 2\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    var noIM = a > 1 && b === 0;\r\n    var oneMinus = 1 - a;\r\n    var onePlus = 1 + a;\r\n    var d = oneMinus * oneMinus + b * b;\r\n\r\n    var x = (d !== 0)\r\n            ? new Complex(\r\n                    (onePlus * oneMinus - b * b) / d,\r\n                    (b * oneMinus + onePlus * b) / d)\r\n            : new Complex(\r\n                    (a !== -1) ? (a / 0) : 0,\r\n                    (b !== 0) ? (b / 0) : 0);\r\n\r\n    var temp = x['re'];\r\n    x['re'] = logHypot(x['re'], x['im']) / 2;\r\n    x['im'] = Math.atan2(x['im'], temp) / 2;\r\n    if (noIM) {\r\n      x['im'] = -x['im'];\r\n    }\r\n    return x;\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex acoth\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'acoth': function() {\r\n\r\n    // acoth(c) = log((c+1) / (c-1)) / 2\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    if (a === 0 && b === 0) {\r\n      return new Complex(0, Math.PI / 2);\r\n    }\r\n\r\n    var d = a * a + b * b;\r\n    return (d !== 0)\r\n            ? new Complex(\r\n                    a / d,\r\n                    -b / d).atanh()\r\n            : new Complex(\r\n                    (a !== 0) ? a / 0 : 0,\r\n                    (b !== 0) ? -b / 0 : 0).atanh();\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex acsch\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'acsch': function() {\r\n\r\n    // acsch(c) = log((1+sqrt(1+c^2))/c)\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    if (b === 0) {\r\n\r\n      return new Complex(\r\n              (a !== 0)\r\n              ? Math.log(a + Math.sqrt(a * a + 1))\r\n              : Infinity, 0);\r\n    }\r\n\r\n    var d = a * a + b * b;\r\n    return (d !== 0)\r\n            ? new Complex(\r\n                    a / d,\r\n                    -b / d).asinh()\r\n            : new Complex(\r\n                    (a !== 0) ? a / 0 : 0,\r\n                    (b !== 0) ? -b / 0 : 0).asinh();\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex asech\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'asech': function() {\r\n\r\n    // asech(c) = log((1+sqrt(1-c^2))/c)\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    if (this['isZero']()) {\r\n      return Complex['INFINITY'];\r\n    }\r\n\r\n    var d = a * a + b * b;\r\n    return (d !== 0)\r\n            ? new Complex(\r\n                    a / d,\r\n                    -b / d).acosh()\r\n            : new Complex(\r\n                    (a !== 0) ? a / 0 : 0,\r\n                    (b !== 0) ? -b / 0 : 0).acosh();\r\n  },\r\n\r\n  /**\r\n   * Calculate the complex inverse 1/z\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'inverse': function() {\r\n\r\n    // 1 / 0 = Infinity and 1 / Infinity = 0\r\n    if (this['isZero']()) {\r\n      return Complex['INFINITY'];\r\n    }\r\n\r\n    if (this['isInfinite']()) {\r\n      return Complex['ZERO'];\r\n    }\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n\r\n    var d = a * a + b * b;\r\n\r\n    return new Complex(a / d, -b / d);\r\n  },\r\n\r\n  /**\r\n   * Returns the complex conjugate\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'conjugate': function() {\r\n\r\n    return new Complex(this['re'], -this['im']);\r\n  },\r\n\r\n  /**\r\n   * Gets the negated complex number\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'neg': function() {\r\n\r\n    return new Complex(-this['re'], -this['im']);\r\n  },\r\n\r\n  /**\r\n   * Ceils the actual complex number\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'ceil': function(places) {\r\n\r\n    places = Math.pow(10, places || 0);\r\n\r\n    return new Complex(\r\n            Math.ceil(this['re'] * places) / places,\r\n            Math.ceil(this['im'] * places) / places);\r\n  },\r\n\r\n  /**\r\n   * Floors the actual complex number\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'floor': function(places) {\r\n\r\n    places = Math.pow(10, places || 0);\r\n\r\n    return new Complex(\r\n            Math.floor(this['re'] * places) / places,\r\n            Math.floor(this['im'] * places) / places);\r\n  },\r\n\r\n  /**\r\n   * Ceils the actual complex number\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'round': function(places) {\r\n\r\n    places = Math.pow(10, places || 0);\r\n\r\n    return new Complex(\r\n            Math.round(this['re'] * places) / places,\r\n            Math.round(this['im'] * places) / places);\r\n  },\r\n\r\n  /**\r\n   * Compares two complex numbers\r\n   *\r\n   * **Note:** new Complex(Infinity).equals(Infinity) === false\r\n   *\r\n   * @returns {boolean}\r\n   */\r\n  'equals': function(a, b) {\r\n\r\n    var z = new Complex(a, b);\r\n\r\n    return Math.abs(z['re'] - this['re']) <= Complex['EPSILON'] &&\r\n            Math.abs(z['im'] - this['im']) <= Complex['EPSILON'];\r\n  },\r\n\r\n  /**\r\n   * Clones the actual object\r\n   *\r\n   * @returns {Complex}\r\n   */\r\n  'clone': function() {\r\n\r\n    return new Complex(this['re'], this['im']);\r\n  },\r\n\r\n  /**\r\n   * Gets a string of the actual complex number\r\n   *\r\n   * @returns {string}\r\n   */\r\n  'toString': function() {\r\n\r\n    var a = this['re'];\r\n    var b = this['im'];\r\n    var ret = \"\";\r\n\r\n    if (this['isNaN']()) {\r\n      return 'NaN';\r\n    }\r\n\r\n    if (this['isInfinite']()) {\r\n      return 'Infinity';\r\n    }\r\n\r\n    // If is real number\r\n    if (b === 0) {\r\n      return ret + a;\r\n    }\r\n\r\n    if (a !== 0) {\r\n      ret+= a;\r\n      ret+= \" \";\r\n      if (b < 0) {\r\n        b = -b;\r\n        ret+= \"-\";\r\n      } else {\r\n        ret+= \"+\";\r\n      }\r\n      ret+= \" \";\r\n    } else if (b < 0) {\r\n      b = -b;\r\n      ret+= \"-\";\r\n    }\r\n\r\n    if (1 !== b) { // b is the absolute imaginary part\r\n      ret+= b;\r\n    }\r\n    return ret + \"i\";\r\n  },\r\n\r\n  /**\r\n   * Returns the actual number as a vector\r\n   *\r\n   * @returns {Array}\r\n   */\r\n  'toVector': function() {\r\n\r\n    return [this['re'], this['im']];\r\n  },\r\n\r\n  /**\r\n   * Returns the actual real value of the current object\r\n   *\r\n   * @returns {number|null}\r\n   */\r\n  'valueOf': function() {\r\n\r\n    if (this['im'] === 0) {\r\n      return this['re'];\r\n    }\r\n    return null;\r\n  },\r\n\r\n  /**\r\n   * Determines whether a complex number is not on the Riemann sphere.\r\n   *\r\n   * @returns {boolean}\r\n   */\r\n  'isNaN': function() {\r\n    return isNaN(this['re']) || isNaN(this['im']);\r\n  },\r\n\r\n  /**\r\n   * Determines whether or not a complex number is at the zero pole of the\r\n   * Riemann sphere.\r\n   *\r\n   * @returns {boolean}\r\n   */\r\n  'isZero': function() {\r\n    return this['im'] === 0 && this['re'] === 0;\r\n  },\r\n\r\n  /**\r\n   * Determines whether a complex number is not at the infinity pole of the\r\n   * Riemann sphere.\r\n   *\r\n   * @returns {boolean}\r\n   */\r\n  'isFinite': function() {\r\n    return isFinite(this['re']) && isFinite(this['im']);\r\n  },\r\n\r\n  /**\r\n   * Determines whether or not a complex number is at the infinity pole of the\r\n   * Riemann sphere.\r\n   *\r\n   * @returns {boolean}\r\n   */\r\n  'isInfinite': function() {\r\n    return !(this['isNaN']() || this['isFinite']());\r\n  }\r\n};\r\n\r\nComplex['ZERO'] = new Complex(0, 0);\r\nComplex['ONE'] = new Complex(1, 0);\r\nComplex['I'] = new Complex(0, 1);\r\nComplex['PI'] = new Complex(Math.PI, 0);\r\nComplex['E'] = new Complex(Math.E, 0);\r\nComplex['INFINITY'] = new Complex(Infinity, Infinity);\r\nComplex['NAN'] = new Complex(NaN, NaN);\r\nComplex['EPSILON'] = 1e-16;\r\n\r\n// Since no need to customize the export in React, we can just export the class directly\r\n\r\n// if (typeof define === 'function' && define['amd']) {\r\n//   define([], function() {\r\n//     return Complex;\r\n//   });\r\n// } else if (typeof exports === 'object') {\r\n//   Object.defineProperty(Complex, \"__esModule\", {'value': true});\r\n//   Complex['default'] = Complex;\r\n//   Complex['Complex'] = Complex;\r\n//   module['exports'] = Complex;\r\n// } else {\r\n//   root['Complex'] = Complex;\r\n// }\r\n\r\nexport {Complex};"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,YAAY;;AAEZ,IAAIA,IAAI,GAAG,SAAAA,CAASC,CAAC,EAAE;EACrB,OAAO,CAACC,IAAI,CAACC,GAAG,CAACF,CAAC,CAAC,GAAGC,IAAI,CAACC,GAAG,CAAC,CAACF,CAAC,CAAC,IAAI,GAAG;AAC3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