@@ -916,11 +916,15 @@ P.toFixed = function (dp, rm) {
916916
917917
918918/*
919- * Return a string representing the value of this Big in exponential notation.
920- * Include the sign for negative zero.
919+ * Return a string representing the value of this Big.
920+ * Return exponential notation if this Big has a positive exponent equal to or greater than
921+ * Big.PE, or a negative exponent equal to or less than Big.NE.
922+ * Omit the sign for negative zero.
921923 */
922- P . toJSON = function ( ) {
923- return stringify ( this , true , true ) ;
924+ P . toJSON = P . toString = function ( ) {
925+ var x = this ,
926+ Big = x . constructor ;
927+ return stringify ( x , x . e <= Big . NE || x . e >= Big . PE , ! ! x . c [ 0 ] ) ;
924928} ;
925929
926930
@@ -962,19 +966,6 @@ P.toPrecision = function (sd, rm) {
962966} ;
963967
964968
965- /*
966- * Return a string representing the value of this Big.
967- * Return exponential notation if this Big has a positive exponent equal to or greater than
968- * Big.PE, or a negative exponent equal to or less than Big.NE.
969- * Omit the sign for negative zero.
970- */
971- P . toString = function ( ) {
972- var x = this ,
973- Big = x . constructor ;
974- return stringify ( x , x . e <= Big . NE || x . e >= Big . PE , ! ! x . c [ 0 ] ) ;
975- } ;
976-
977-
978969/*
979970 * Return a string representing the value of this Big.
980971 * Return exponential notation if this Big has a positive exponent equal to or greater than
0 commit comments