]> granicus.if.org Git - php/commitdiff
Use DivisionByZeroError instead of exception for %/intdiv()
authorBob Weinand <bobwei9@hotmail.com>
Wed, 1 Jul 2015 23:54:08 +0000 (01:54 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Thu, 2 Jul 2015 00:20:58 +0000 (02:20 +0200)
12 files changed:
Zend/tests/bug69957.phpt
Zend/tests/compound_assign_with_numeric_strings.phpt
Zend/tests/mod_001.phpt
Zend/zend_exceptions.c
Zend/zend_exceptions.h
Zend/zend_operators.c
Zend/zend_vm_def.h
Zend/zend_vm_execute.h
ext/standard/math.c
ext/standard/tests/math/intdiv.phpt
tests/lang/operators/modulus_basiclong_64bit.phpt
tests/lang/operators/modulus_variationStr.phpt

index 7f2c76b918570655e85c95710439535d18b9ccd0..5aa0edab21086e2f82f1f8d7dcc867fc1a06e072 100644 (file)
@@ -64,16 +64,16 @@ try {
 float(INF)
 
 Variable mod
-Type: Exception
-Message: Division by zero
+Type: DivisionByZeroError
+Message: Modulo by zero
 float(INF)
 
 Literal mod
-Type: Exception
-Message: Division by zero
+Type: DivisionByZeroError
+Message: Modulo by zero
 float(INF)
 
 Double mod
-Type: Exception
-Message: Division by zero
+Type: DivisionByZeroError
+Message: Modulo by zero
 
index 518ed9ee7e3e4b598658714d39642bc2e120617d..fbfc1605ecf35b865bf4d3817dd14f7481942055 100644 (file)
@@ -11,7 +11,7 @@ $n = "-1";
 try {
     $n <<= $n;
     var_dump($n);
-} catch (Exception $e) {
+} catch (Throwable $e) {
        echo "\nException: " . $e->getMessage() . "\n";
 }
 
@@ -23,7 +23,7 @@ $n = "-1";
 try {
   $n >>= $n;
   var_dump($n);
-} catch (Exception $e) {
+} catch (Throwable $e) {
        echo "\nException: " . $e->getMessage() . "\n";
 }
 
@@ -31,7 +31,7 @@ $n = "0";
 try{
   $n %= $n;
   var_dump($n);
-} catch (Exception $e) {
+} catch (Throwable $e) {
        echo "\nException: " . $e->getMessage() . "\n";
 }
 
@@ -46,5 +46,5 @@ int(0)
 
 Exception: Bit shift by negative number
 
-Exception: Division by zero
+Exception: Modulo by zero
 int(0)
index 8dda405abfb900144e779fc8417bb752b432e2d8..ff589e2feeeafe1d9ec3a79dba48f2c81fd88122 100644 (file)
@@ -9,12 +9,12 @@ $b = array();
 try {
     $c = $a % $b;
     var_dump($c);
-} catch (Exception $e) {
+} catch (Throwable $e) {
        echo "Exception: " . $e->getMessage() . "\n";
 }
 
 echo "Done\n";
 ?>
---EXPECTF--    
-Exception: Division by zero
+--EXPECT--
+Exception: Modulo by zero
 Done
index b0547b07a9adcd7777d2bf88e086d166af6465b8..9f5b2448d1a3df30b77dd44b2f3f99cc214c5870 100644 (file)
@@ -31,6 +31,7 @@
 #include "zend_smart_str.h"
 
 ZEND_API zend_class_entry *zend_ce_throwable;
+ZEND_API zend_class_entry *zend_ce_division_by_zero_error;
 
 static zend_class_entry *default_exception_ce;
 static zend_class_entry *error_exception_ce;
@@ -853,6 +854,10 @@ void zend_register_default_exception(void) /* {{{ */
        INIT_CLASS_ENTRY(ce, "TypeError", NULL);
        type_error_ce = zend_register_internal_class_ex(&ce, error_ce);
        type_error_ce->create_object = zend_default_exception_new;
+
+       INIT_CLASS_ENTRY(ce, "DivisionByZeroError", NULL);
+       zend_ce_division_by_zero_error = zend_register_internal_class_ex(&ce, error_ce);
+       zend_ce_division_by_zero_error->create_object = zend_default_exception_new;
 }
 /* }}} */
 
index 944fe555ce43931c9cc4ccc5260cfc21f1b662c2..f07bc78b88e81d26894c90c93eeec6ff5d62d12a 100644 (file)
@@ -27,6 +27,7 @@
 BEGIN_EXTERN_C()
 
 extern ZEND_API zend_class_entry *zend_ce_throwable;
+extern ZEND_API zend_class_entry *zend_ce_division_by_zero_error;
 
 ZEND_API void zend_exception_set_previous(zend_object *exception, zend_object *add_previous);
 ZEND_API void zend_exception_save(void);
index 7abd978079ed296e4e0bc91584f96f686fabca39..a669cc206cd86ae47b9c865f146a9000e7f63169 100644 (file)
@@ -1157,7 +1157,7 @@ ZEND_API int ZEND_FASTCALL mod_function(zval *result, zval *op1, zval *op2) /* {
        if (op2_lval == 0) {
                /* modulus by zero */
                if (EG(current_execute_data) && !CG(in_compilation)) {
-                       zend_throw_exception_ex(NULL, 0, "Division by zero");
+                       zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero");
                } else {
                        zend_error_noreturn(E_ERROR, "Division by zero");
                }
index 66398e5bfa3fd8d275b3fc174613fab06b6b9c18..294a9ba9c79c0b8f4e54c86304676e9d7e45b6a1 100644 (file)
@@ -189,7 +189,7 @@ ZEND_VM_HANDLER(5, ZEND_MOD, CONST|TMPVAR|CV, CONST|TMPVAR|CV)
                        result = EX_VAR(opline->result.var);
                        if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
                                SAVE_OPLINE();
-                               zend_throw_exception_ex(NULL, 0, "Division by zero");
+                               zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero");
                                HANDLE_EXCEPTION();
                        } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
                                /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
index 994a15859cddb114c037219007c8b3bc2bccba92..729ad1be6d1cee64674d27d610eeeec7eb39b37a 100644 (file)
@@ -4493,7 +4493,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CONST_HANDLER(Z
                        result = EX_VAR(opline->result.var);
                        if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
                                SAVE_OPLINE();
-                               zend_throw_exception_ex(NULL, 0, "Division by zero");
+                               zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero");
                                HANDLE_EXCEPTION();
                        } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
                                /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
@@ -8516,7 +8516,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CONST_CV_HANDLER(ZEND
                        result = EX_VAR(opline->result.var);
                        if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
                                SAVE_OPLINE();
-                               zend_throw_exception_ex(NULL, 0, "Division by zero");
+                               zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero");
                                HANDLE_EXCEPTION();
                        } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
                                /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
@@ -10391,7 +10391,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CONST_TMPVAR_HANDLER(
                        result = EX_VAR(opline->result.var);
                        if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
                                SAVE_OPLINE();
-                               zend_throw_exception_ex(NULL, 0, "Division by zero");
+                               zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero");
                                HANDLE_EXCEPTION();
                        } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
                                /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
@@ -30189,7 +30189,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CV_CONST_HANDLER(ZEND
                        result = EX_VAR(opline->result.var);
                        if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
                                SAVE_OPLINE();
-                               zend_throw_exception_ex(NULL, 0, "Division by zero");
+                               zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero");
                                HANDLE_EXCEPTION();
                        } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
                                /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
@@ -35497,7 +35497,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CV_CV_HANDLER(ZEND_OP
                        result = EX_VAR(opline->result.var);
                        if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
                                SAVE_OPLINE();
-                               zend_throw_exception_ex(NULL, 0, "Division by zero");
+                               zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero");
                                HANDLE_EXCEPTION();
                        } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
                                /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
@@ -38228,7 +38228,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_CV_TMPVAR_HANDLER(ZEN
                        result = EX_VAR(opline->result.var);
                        if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
                                SAVE_OPLINE();
-                               zend_throw_exception_ex(NULL, 0, "Division by zero");
+                               zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero");
                                HANDLE_EXCEPTION();
                        } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
                                /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
@@ -41301,7 +41301,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_TMPVAR_CONST_HANDLER(
                        result = EX_VAR(opline->result.var);
                        if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
                                SAVE_OPLINE();
-                               zend_throw_exception_ex(NULL, 0, "Division by zero");
+                               zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero");
                                HANDLE_EXCEPTION();
                        } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
                                /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
@@ -43731,7 +43731,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_TMPVAR_CV_HANDLER(ZEN
                        result = EX_VAR(opline->result.var);
                        if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
                                SAVE_OPLINE();
-                               zend_throw_exception_ex(NULL, 0, "Division by zero");
+                               zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero");
                                HANDLE_EXCEPTION();
                        } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
                                /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
@@ -44894,7 +44894,7 @@ static ZEND_OPCODE_HANDLER_RET ZEND_FASTCALL ZEND_MOD_SPEC_TMPVAR_TMPVAR_HANDLER
                        result = EX_VAR(opline->result.var);
                        if (UNEXPECTED(Z_LVAL_P(op2) == 0)) {
                                SAVE_OPLINE();
-                               zend_throw_exception_ex(NULL, 0, "Division by zero");
+                               zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Modulo by zero");
                                HANDLE_EXCEPTION();
                        } else if (UNEXPECTED(Z_LVAL_P(op2) == -1)) {
                                /* Prevent overflow error/crash if op1==ZEND_LONG_MIN */
index 33c83626a12467edabe5fd3e85b59573eac1917e..cdfb486c4fddd6ddaab59cad208c5a0b8d638370 100644 (file)
@@ -1467,16 +1467,16 @@ PHP_FUNCTION(intdiv)
        }
 
        if (divisor == 0) {
-               zend_throw_exception_ex(NULL, 0, "Division by zero");
+               zend_throw_exception_ex(zend_ce_division_by_zero_error, 0, "Division by zero");
                return;
        } else if (divisor == -1 && numerator == ZEND_LONG_MIN) {
-               /* Prevent overflow error/crash
+               /* Prevent overflow error/crash ... really should not happen:
                   We don't return a float here as that violates function contract */
-               zend_throw_exception_ex(NULL, 0, "Division of PHP_INT_MIN by -1 is not an integer");
+               zend_error(E_ERROR | E_EXCEPTION, "Division of PHP_INT_MIN by -1 is not an integer");
                return;
        }
 
-       RETURN_LONG(numerator/divisor);
+       RETURN_LONG(numerator / divisor);
 }
 /* }}} */
 
index 9362be638f1f5640a535250be6e666de17436299..b441cb0a868028bcbd7569f8c6a3c2a1fe573d6b 100644 (file)
@@ -10,12 +10,12 @@ var_dump(intdiv(PHP_INT_MAX, PHP_INT_MAX));
 var_dump(intdiv(PHP_INT_MIN, PHP_INT_MIN));
 try {
   var_dump(intdiv(PHP_INT_MIN, -1));
-} catch (Exception $e) {
+} catch (Throwable $e) {
   echo "Exception: " . $e->getMessage() . "\n";
 }
 try {
   var_dump(intdiv(1, 0));
-} catch (Exception $e) {
+} catch (Throwable $e) {
   echo "Exception: " . $e->getMessage() . "\n";
 }
 
index 3fef77d85cc5ef6c2718e69b2e87b505ced94cb7..c2db77c12026387eecf18737829b22b96853c37f 100644 (file)
@@ -27,7 +27,7 @@ foreach ($longVals as $longVal) {
          echo "--- testing: $longVal % $otherVal ---\n";
          try {
            var_dump($longVal%$otherVal);
-      } catch (Exception $e) {
+      } catch (Throwable $e) {
         echo "Exception: " . $e->getMessage() . "\n";
       }
    }
@@ -38,7 +38,7 @@ foreach ($otherVals as $otherVal) {
          echo "--- testing: $otherVal % $longVal ---\n";
          try {
         var_dump($otherVal%$longVal);
-      } catch (Exception $e) {
+      } catch (Throwable $e) {
         echo "Exception: " . $e->getMessage() . "\n";
       }
    }
@@ -48,7 +48,7 @@ foreach ($otherVals as $otherVal) {
 ===DONE===
 --EXPECT--
 --- testing: 9223372036854775807 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: 9223372036854775807 % 1 ---
 int(0)
 --- testing: 9223372036854775807 % -1 ---
@@ -66,7 +66,7 @@ int(1)
 --- testing: 9223372036854775807 % 9223372036854775807 ---
 int(0)
 --- testing: -9223372036854775808 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: -9223372036854775808 % 1 ---
 int(0)
 --- testing: -9223372036854775808 % -1 ---
@@ -84,7 +84,7 @@ int(-2)
 --- testing: -9223372036854775808 % 9223372036854775807 ---
 int(-1)
 --- testing: 2147483647 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: 2147483647 % 1 ---
 int(0)
 --- testing: 2147483647 % -1 ---
@@ -102,7 +102,7 @@ int(0)
 --- testing: 2147483647 % 9223372036854775807 ---
 int(2147483647)
 --- testing: -2147483648 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: -2147483648 % 1 ---
 int(0)
 --- testing: -2147483648 % -1 ---
@@ -120,7 +120,7 @@ int(-1)
 --- testing: -2147483648 % 9223372036854775807 ---
 int(-2147483648)
 --- testing: 9223372034707292160 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: 9223372034707292160 % 1 ---
 int(0)
 --- testing: 9223372034707292160 % -1 ---
@@ -138,7 +138,7 @@ int(1)
 --- testing: 9223372034707292160 % 9223372036854775807 ---
 int(9223372034707292160)
 --- testing: -9223372034707292160 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: -9223372034707292160 % 1 ---
 int(0)
 --- testing: -9223372034707292160 % -1 ---
@@ -156,7 +156,7 @@ int(-1)
 --- testing: -9223372034707292160 % 9223372036854775807 ---
 int(-9223372034707292160)
 --- testing: 2147483648 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: 2147483648 % 1 ---
 int(0)
 --- testing: 2147483648 % -1 ---
@@ -174,7 +174,7 @@ int(1)
 --- testing: 2147483648 % 9223372036854775807 ---
 int(2147483648)
 --- testing: -2147483649 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: -2147483649 % 1 ---
 int(0)
 --- testing: -2147483649 % -1 ---
@@ -192,7 +192,7 @@ int(-2)
 --- testing: -2147483649 % 9223372036854775807 ---
 int(-2147483649)
 --- testing: 4294967294 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: 4294967294 % 1 ---
 int(0)
 --- testing: 4294967294 % -1 ---
@@ -210,7 +210,7 @@ int(0)
 --- testing: 4294967294 % 9223372036854775807 ---
 int(4294967294)
 --- testing: 4294967295 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: 4294967295 % 1 ---
 int(0)
 --- testing: 4294967295 % -1 ---
@@ -228,7 +228,7 @@ int(1)
 --- testing: 4294967295 % 9223372036854775807 ---
 int(4294967295)
 --- testing: 4294967293 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: 4294967293 % 1 ---
 int(0)
 --- testing: 4294967293 % -1 ---
@@ -246,7 +246,7 @@ int(2147483646)
 --- testing: 4294967293 % 9223372036854775807 ---
 int(4294967293)
 --- testing: 9223372036854775806 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: 9223372036854775806 % 1 ---
 int(0)
 --- testing: 9223372036854775806 % -1 ---
@@ -264,7 +264,7 @@ int(0)
 --- testing: 9223372036854775806 % 9223372036854775807 ---
 int(9223372036854775806)
 --- testing: 9.2233720368548E+18 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: 9.2233720368548E+18 % 1 ---
 int(0)
 --- testing: 9.2233720368548E+18 % -1 ---
@@ -282,7 +282,7 @@ int(-2)
 --- testing: 9.2233720368548E+18 % 9223372036854775807 ---
 int(-1)
 --- testing: -9223372036854775807 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: -9223372036854775807 % 1 ---
 int(0)
 --- testing: -9223372036854775807 % -1 ---
@@ -300,7 +300,7 @@ int(-1)
 --- testing: -9223372036854775807 % 9223372036854775807 ---
 int(0)
 --- testing: -9.2233720368548E+18 % 0 ---
-Exception: Division by zero
+Exception: Modulo by zero
 --- testing: -9.2233720368548E+18 % 1 ---
 int(0)
 --- testing: -9.2233720368548E+18 % -1 ---
index 24312b56112ea6d99862a98ea0a7aa013bc49128..49487000b3ce1d0b5d4fc206c6f5e2cd8ac92a09 100644 (file)
@@ -15,7 +15,7 @@ foreach ($strVals as $strVal) {
          echo "--- testing: '$strVal' % '$otherVal' ---\n";\r
       try {\r
         var_dump($strVal%$otherVal);\r
-      } catch (Exception $e) {\r
+      } catch (Throwable $e) {\r
         echo "Exception: " . $e->getMessage() . "\n";\r
       }\r
    }\r
@@ -25,396 +25,396 @@ foreach ($strVals as $strVal) {
 ?>\r
 ===DONE===\r
 --EXPECT--\r
---- testing: '0' % '0' ---
-Exception: Division by zero
---- testing: '0' % '65' ---
-int(0)
---- testing: '0' % '-44' ---
-int(0)
---- testing: '0' % '1.2' ---
-int(0)
---- testing: '0' % '-7.7' ---
-int(0)
---- testing: '0' % 'abc' ---
-Exception: Division by zero
---- testing: '0' % '123abc' ---
-int(0)
---- testing: '0' % '123e5' ---
-int(0)
---- testing: '0' % '123e5xyz' ---
-int(0)
---- testing: '0' % ' 123abc' ---
-int(0)
---- testing: '0' % '123 abc' ---
-int(0)
---- testing: '0' % '123abc ' ---
-int(0)
---- testing: '0' % '3.4a' ---
-int(0)
---- testing: '0' % 'a5.9' ---
-Exception: Division by zero
---- testing: '65' % '0' ---
-Exception: Division by zero
---- testing: '65' % '65' ---
-int(0)
---- testing: '65' % '-44' ---
-int(21)
---- testing: '65' % '1.2' ---
-int(0)
---- testing: '65' % '-7.7' ---
-int(2)
---- testing: '65' % 'abc' ---
-Exception: Division by zero
---- testing: '65' % '123abc' ---
-int(65)
---- testing: '65' % '123e5' ---
-int(65)
---- testing: '65' % '123e5xyz' ---
-int(65)
---- testing: '65' % ' 123abc' ---
-int(65)
---- testing: '65' % '123 abc' ---
-int(65)
---- testing: '65' % '123abc ' ---
-int(65)
---- testing: '65' % '3.4a' ---
-int(2)
---- testing: '65' % 'a5.9' ---
-Exception: Division by zero
---- testing: '-44' % '0' ---
-Exception: Division by zero
---- testing: '-44' % '65' ---
-int(-44)
---- testing: '-44' % '-44' ---
-int(0)
---- testing: '-44' % '1.2' ---
-int(0)
---- testing: '-44' % '-7.7' ---
-int(-2)
---- testing: '-44' % 'abc' ---
-Exception: Division by zero
---- testing: '-44' % '123abc' ---
-int(-44)
---- testing: '-44' % '123e5' ---
-int(-44)
---- testing: '-44' % '123e5xyz' ---
-int(-44)
---- testing: '-44' % ' 123abc' ---
-int(-44)
---- testing: '-44' % '123 abc' ---
-int(-44)
---- testing: '-44' % '123abc ' ---
-int(-44)
---- testing: '-44' % '3.4a' ---
-int(-2)
---- testing: '-44' % 'a5.9' ---
-Exception: Division by zero
---- testing: '1.2' % '0' ---
-Exception: Division by zero
---- testing: '1.2' % '65' ---
-int(1)
---- testing: '1.2' % '-44' ---
-int(1)
---- testing: '1.2' % '1.2' ---
-int(0)
---- testing: '1.2' % '-7.7' ---
-int(1)
---- testing: '1.2' % 'abc' ---
-Exception: Division by zero
---- testing: '1.2' % '123abc' ---
-int(1)
---- testing: '1.2' % '123e5' ---
-int(1)
---- testing: '1.2' % '123e5xyz' ---
-int(1)
---- testing: '1.2' % ' 123abc' ---
-int(1)
---- testing: '1.2' % '123 abc' ---
-int(1)
---- testing: '1.2' % '123abc ' ---
-int(1)
---- testing: '1.2' % '3.4a' ---
-int(1)
---- testing: '1.2' % 'a5.9' ---
-Exception: Division by zero
---- testing: '-7.7' % '0' ---
-Exception: Division by zero
---- testing: '-7.7' % '65' ---
-int(-7)
---- testing: '-7.7' % '-44' ---
-int(-7)
---- testing: '-7.7' % '1.2' ---
-int(0)
---- testing: '-7.7' % '-7.7' ---
-int(0)
---- testing: '-7.7' % 'abc' ---
-Exception: Division by zero
---- testing: '-7.7' % '123abc' ---
-int(-7)
---- testing: '-7.7' % '123e5' ---
-int(-7)
---- testing: '-7.7' % '123e5xyz' ---
-int(-7)
---- testing: '-7.7' % ' 123abc' ---
-int(-7)
---- testing: '-7.7' % '123 abc' ---
-int(-7)
---- testing: '-7.7' % '123abc ' ---
-int(-7)
---- testing: '-7.7' % '3.4a' ---
-int(-1)
---- testing: '-7.7' % 'a5.9' ---
-Exception: Division by zero
---- testing: 'abc' % '0' ---
-Exception: Division by zero
---- testing: 'abc' % '65' ---
-int(0)
---- testing: 'abc' % '-44' ---
-int(0)
---- testing: 'abc' % '1.2' ---
-int(0)
---- testing: 'abc' % '-7.7' ---
-int(0)
---- testing: 'abc' % 'abc' ---
-Exception: Division by zero
---- testing: 'abc' % '123abc' ---
-int(0)
---- testing: 'abc' % '123e5' ---
-int(0)
---- testing: 'abc' % '123e5xyz' ---
-int(0)
---- testing: 'abc' % ' 123abc' ---
-int(0)
---- testing: 'abc' % '123 abc' ---
-int(0)
---- testing: 'abc' % '123abc ' ---
-int(0)
---- testing: 'abc' % '3.4a' ---
-int(0)
---- testing: 'abc' % 'a5.9' ---
-Exception: Division by zero
---- testing: '123abc' % '0' ---
-Exception: Division by zero
---- testing: '123abc' % '65' ---
-int(58)
---- testing: '123abc' % '-44' ---
-int(35)
---- testing: '123abc' % '1.2' ---
-int(0)
---- testing: '123abc' % '-7.7' ---
-int(4)
---- testing: '123abc' % 'abc' ---
-Exception: Division by zero
---- testing: '123abc' % '123abc' ---
-int(0)
---- testing: '123abc' % '123e5' ---
-int(0)
---- testing: '123abc' % '123e5xyz' ---
-int(0)
---- testing: '123abc' % ' 123abc' ---
-int(0)
---- testing: '123abc' % '123 abc' ---
-int(0)
---- testing: '123abc' % '123abc ' ---
-int(0)
---- testing: '123abc' % '3.4a' ---
-int(0)
---- testing: '123abc' % 'a5.9' ---
-Exception: Division by zero
---- testing: '123e5' % '0' ---
-Exception: Division by zero
---- testing: '123e5' % '65' ---
-int(58)
---- testing: '123e5' % '-44' ---
-int(35)
---- testing: '123e5' % '1.2' ---
-int(0)
---- testing: '123e5' % '-7.7' ---
-int(4)
---- testing: '123e5' % 'abc' ---
-Exception: Division by zero
---- testing: '123e5' % '123abc' ---
-int(0)
---- testing: '123e5' % '123e5' ---
-int(0)
---- testing: '123e5' % '123e5xyz' ---
-int(0)
---- testing: '123e5' % ' 123abc' ---
-int(0)
---- testing: '123e5' % '123 abc' ---
-int(0)
---- testing: '123e5' % '123abc ' ---
-int(0)
---- testing: '123e5' % '3.4a' ---
-int(0)
---- testing: '123e5' % 'a5.9' ---
-Exception: Division by zero
---- testing: '123e5xyz' % '0' ---
-Exception: Division by zero
---- testing: '123e5xyz' % '65' ---
-int(58)
---- testing: '123e5xyz' % '-44' ---
-int(35)
---- testing: '123e5xyz' % '1.2' ---
-int(0)
---- testing: '123e5xyz' % '-7.7' ---
-int(4)
---- testing: '123e5xyz' % 'abc' ---
-Exception: Division by zero
---- testing: '123e5xyz' % '123abc' ---
-int(0)
---- testing: '123e5xyz' % '123e5' ---
-int(0)
---- testing: '123e5xyz' % '123e5xyz' ---
-int(0)
---- testing: '123e5xyz' % ' 123abc' ---
-int(0)
---- testing: '123e5xyz' % '123 abc' ---
-int(0)
---- testing: '123e5xyz' % '123abc ' ---
-int(0)
---- testing: '123e5xyz' % '3.4a' ---
-int(0)
---- testing: '123e5xyz' % 'a5.9' ---
-Exception: Division by zero
---- testing: ' 123abc' % '0' ---
-Exception: Division by zero
---- testing: ' 123abc' % '65' ---
-int(58)
---- testing: ' 123abc' % '-44' ---
-int(35)
---- testing: ' 123abc' % '1.2' ---
-int(0)
---- testing: ' 123abc' % '-7.7' ---
-int(4)
---- testing: ' 123abc' % 'abc' ---
-Exception: Division by zero
---- testing: ' 123abc' % '123abc' ---
-int(0)
---- testing: ' 123abc' % '123e5' ---
-int(0)
---- testing: ' 123abc' % '123e5xyz' ---
-int(0)
---- testing: ' 123abc' % ' 123abc' ---
-int(0)
---- testing: ' 123abc' % '123 abc' ---
-int(0)
---- testing: ' 123abc' % '123abc ' ---
-int(0)
---- testing: ' 123abc' % '3.4a' ---
-int(0)
---- testing: ' 123abc' % 'a5.9' ---
-Exception: Division by zero
---- testing: '123 abc' % '0' ---
-Exception: Division by zero
---- testing: '123 abc' % '65' ---
-int(58)
---- testing: '123 abc' % '-44' ---
-int(35)
---- testing: '123 abc' % '1.2' ---
-int(0)
---- testing: '123 abc' % '-7.7' ---
-int(4)
---- testing: '123 abc' % 'abc' ---
-Exception: Division by zero
---- testing: '123 abc' % '123abc' ---
-int(0)
---- testing: '123 abc' % '123e5' ---
-int(0)
---- testing: '123 abc' % '123e5xyz' ---
-int(0)
---- testing: '123 abc' % ' 123abc' ---
-int(0)
---- testing: '123 abc' % '123 abc' ---
-int(0)
---- testing: '123 abc' % '123abc ' ---
-int(0)
---- testing: '123 abc' % '3.4a' ---
-int(0)
---- testing: '123 abc' % 'a5.9' ---
-Exception: Division by zero
---- testing: '123abc ' % '0' ---
-Exception: Division by zero
---- testing: '123abc ' % '65' ---
-int(58)
---- testing: '123abc ' % '-44' ---
-int(35)
---- testing: '123abc ' % '1.2' ---
-int(0)
---- testing: '123abc ' % '-7.7' ---
-int(4)
---- testing: '123abc ' % 'abc' ---
-Exception: Division by zero
---- testing: '123abc ' % '123abc' ---
-int(0)
---- testing: '123abc ' % '123e5' ---
-int(0)
---- testing: '123abc ' % '123e5xyz' ---
-int(0)
---- testing: '123abc ' % ' 123abc' ---
-int(0)
---- testing: '123abc ' % '123 abc' ---
-int(0)
---- testing: '123abc ' % '123abc ' ---
-int(0)
---- testing: '123abc ' % '3.4a' ---
-int(0)
---- testing: '123abc ' % 'a5.9' ---
-Exception: Division by zero
---- testing: '3.4a' % '0' ---
-Exception: Division by zero
---- testing: '3.4a' % '65' ---
-int(3)
---- testing: '3.4a' % '-44' ---
-int(3)
---- testing: '3.4a' % '1.2' ---
-int(0)
---- testing: '3.4a' % '-7.7' ---
-int(3)
---- testing: '3.4a' % 'abc' ---
-Exception: Division by zero
---- testing: '3.4a' % '123abc' ---
-int(3)
---- testing: '3.4a' % '123e5' ---
-int(3)
---- testing: '3.4a' % '123e5xyz' ---
-int(3)
---- testing: '3.4a' % ' 123abc' ---
-int(3)
---- testing: '3.4a' % '123 abc' ---
-int(3)
---- testing: '3.4a' % '123abc ' ---
-int(3)
---- testing: '3.4a' % '3.4a' ---
-int(0)
---- testing: '3.4a' % 'a5.9' ---
-Exception: Division by zero
---- testing: 'a5.9' % '0' ---
-Exception: Division by zero
---- testing: 'a5.9' % '65' ---
-int(0)
---- testing: 'a5.9' % '-44' ---
-int(0)
---- testing: 'a5.9' % '1.2' ---
-int(0)
---- testing: 'a5.9' % '-7.7' ---
-int(0)
---- testing: 'a5.9' % 'abc' ---
-Exception: Division by zero
---- testing: 'a5.9' % '123abc' ---
-int(0)
---- testing: 'a5.9' % '123e5' ---
-int(0)
---- testing: 'a5.9' % '123e5xyz' ---
-int(0)
---- testing: 'a5.9' % ' 123abc' ---
-int(0)
---- testing: 'a5.9' % '123 abc' ---
-int(0)
---- testing: 'a5.9' % '123abc ' ---
-int(0)
---- testing: 'a5.9' % '3.4a' ---
-int(0)
---- testing: 'a5.9' % 'a5.9' ---
-Exception: Division by zero\r
+--- testing: '0' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: '0' % '65' ---\r
+int(0)\r
+--- testing: '0' % '-44' ---\r
+int(0)\r
+--- testing: '0' % '1.2' ---\r
+int(0)\r
+--- testing: '0' % '-7.7' ---\r
+int(0)\r
+--- testing: '0' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: '0' % '123abc' ---\r
+int(0)\r
+--- testing: '0' % '123e5' ---\r
+int(0)\r
+--- testing: '0' % '123e5xyz' ---\r
+int(0)\r
+--- testing: '0' % ' 123abc' ---\r
+int(0)\r
+--- testing: '0' % '123 abc' ---\r
+int(0)\r
+--- testing: '0' % '123abc ' ---\r
+int(0)\r
+--- testing: '0' % '3.4a' ---\r
+int(0)\r
+--- testing: '0' % 'a5.9' ---\r
+Exception: Modulo by zero\r
+--- testing: '65' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: '65' % '65' ---\r
+int(0)\r
+--- testing: '65' % '-44' ---\r
+int(21)\r
+--- testing: '65' % '1.2' ---\r
+int(0)\r
+--- testing: '65' % '-7.7' ---\r
+int(2)\r
+--- testing: '65' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: '65' % '123abc' ---\r
+int(65)\r
+--- testing: '65' % '123e5' ---\r
+int(65)\r
+--- testing: '65' % '123e5xyz' ---\r
+int(65)\r
+--- testing: '65' % ' 123abc' ---\r
+int(65)\r
+--- testing: '65' % '123 abc' ---\r
+int(65)\r
+--- testing: '65' % '123abc ' ---\r
+int(65)\r
+--- testing: '65' % '3.4a' ---\r
+int(2)\r
+--- testing: '65' % 'a5.9' ---\r
+Exception: Modulo by zero\r
+--- testing: '-44' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: '-44' % '65' ---\r
+int(-44)\r
+--- testing: '-44' % '-44' ---\r
+int(0)\r
+--- testing: '-44' % '1.2' ---\r
+int(0)\r
+--- testing: '-44' % '-7.7' ---\r
+int(-2)\r
+--- testing: '-44' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: '-44' % '123abc' ---\r
+int(-44)\r
+--- testing: '-44' % '123e5' ---\r
+int(-44)\r
+--- testing: '-44' % '123e5xyz' ---\r
+int(-44)\r
+--- testing: '-44' % ' 123abc' ---\r
+int(-44)\r
+--- testing: '-44' % '123 abc' ---\r
+int(-44)\r
+--- testing: '-44' % '123abc ' ---\r
+int(-44)\r
+--- testing: '-44' % '3.4a' ---\r
+int(-2)\r
+--- testing: '-44' % 'a5.9' ---\r
+Exception: Modulo by zero\r
+--- testing: '1.2' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: '1.2' % '65' ---\r
+int(1)\r
+--- testing: '1.2' % '-44' ---\r
+int(1)\r
+--- testing: '1.2' % '1.2' ---\r
+int(0)\r
+--- testing: '1.2' % '-7.7' ---\r
+int(1)\r
+--- testing: '1.2' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: '1.2' % '123abc' ---\r
+int(1)\r
+--- testing: '1.2' % '123e5' ---\r
+int(1)\r
+--- testing: '1.2' % '123e5xyz' ---\r
+int(1)\r
+--- testing: '1.2' % ' 123abc' ---\r
+int(1)\r
+--- testing: '1.2' % '123 abc' ---\r
+int(1)\r
+--- testing: '1.2' % '123abc ' ---\r
+int(1)\r
+--- testing: '1.2' % '3.4a' ---\r
+int(1)\r
+--- testing: '1.2' % 'a5.9' ---\r
+Exception: Modulo by zero\r
+--- testing: '-7.7' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: '-7.7' % '65' ---\r
+int(-7)\r
+--- testing: '-7.7' % '-44' ---\r
+int(-7)\r
+--- testing: '-7.7' % '1.2' ---\r
+int(0)\r
+--- testing: '-7.7' % '-7.7' ---\r
+int(0)\r
+--- testing: '-7.7' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: '-7.7' % '123abc' ---\r
+int(-7)\r
+--- testing: '-7.7' % '123e5' ---\r
+int(-7)\r
+--- testing: '-7.7' % '123e5xyz' ---\r
+int(-7)\r
+--- testing: '-7.7' % ' 123abc' ---\r
+int(-7)\r
+--- testing: '-7.7' % '123 abc' ---\r
+int(-7)\r
+--- testing: '-7.7' % '123abc ' ---\r
+int(-7)\r
+--- testing: '-7.7' % '3.4a' ---\r
+int(-1)\r
+--- testing: '-7.7' % 'a5.9' ---\r
+Exception: Modulo by zero\r
+--- testing: 'abc' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: 'abc' % '65' ---\r
+int(0)\r
+--- testing: 'abc' % '-44' ---\r
+int(0)\r
+--- testing: 'abc' % '1.2' ---\r
+int(0)\r
+--- testing: 'abc' % '-7.7' ---\r
+int(0)\r
+--- testing: 'abc' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: 'abc' % '123abc' ---\r
+int(0)\r
+--- testing: 'abc' % '123e5' ---\r
+int(0)\r
+--- testing: 'abc' % '123e5xyz' ---\r
+int(0)\r
+--- testing: 'abc' % ' 123abc' ---\r
+int(0)\r
+--- testing: 'abc' % '123 abc' ---\r
+int(0)\r
+--- testing: 'abc' % '123abc ' ---\r
+int(0)\r
+--- testing: 'abc' % '3.4a' ---\r
+int(0)\r
+--- testing: 'abc' % 'a5.9' ---\r
+Exception: Modulo by zero\r
+--- testing: '123abc' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: '123abc' % '65' ---\r
+int(58)\r
+--- testing: '123abc' % '-44' ---\r
+int(35)\r
+--- testing: '123abc' % '1.2' ---\r
+int(0)\r
+--- testing: '123abc' % '-7.7' ---\r
+int(4)\r
+--- testing: '123abc' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: '123abc' % '123abc' ---\r
+int(0)\r
+--- testing: '123abc' % '123e5' ---\r
+int(0)\r
+--- testing: '123abc' % '123e5xyz' ---\r
+int(0)\r
+--- testing: '123abc' % ' 123abc' ---\r
+int(0)\r
+--- testing: '123abc' % '123 abc' ---\r
+int(0)\r
+--- testing: '123abc' % '123abc ' ---\r
+int(0)\r
+--- testing: '123abc' % '3.4a' ---\r
+int(0)\r
+--- testing: '123abc' % 'a5.9' ---\r
+Exception: Modulo by zero\r
+--- testing: '123e5' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: '123e5' % '65' ---\r
+int(58)\r
+--- testing: '123e5' % '-44' ---\r
+int(35)\r
+--- testing: '123e5' % '1.2' ---\r
+int(0)\r
+--- testing: '123e5' % '-7.7' ---\r
+int(4)\r
+--- testing: '123e5' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: '123e5' % '123abc' ---\r
+int(0)\r
+--- testing: '123e5' % '123e5' ---\r
+int(0)\r
+--- testing: '123e5' % '123e5xyz' ---\r
+int(0)\r
+--- testing: '123e5' % ' 123abc' ---\r
+int(0)\r
+--- testing: '123e5' % '123 abc' ---\r
+int(0)\r
+--- testing: '123e5' % '123abc ' ---\r
+int(0)\r
+--- testing: '123e5' % '3.4a' ---\r
+int(0)\r
+--- testing: '123e5' % 'a5.9' ---\r
+Exception: Modulo by zero\r
+--- testing: '123e5xyz' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: '123e5xyz' % '65' ---\r
+int(58)\r
+--- testing: '123e5xyz' % '-44' ---\r
+int(35)\r
+--- testing: '123e5xyz' % '1.2' ---\r
+int(0)\r
+--- testing: '123e5xyz' % '-7.7' ---\r
+int(4)\r
+--- testing: '123e5xyz' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: '123e5xyz' % '123abc' ---\r
+int(0)\r
+--- testing: '123e5xyz' % '123e5' ---\r
+int(0)\r
+--- testing: '123e5xyz' % '123e5xyz' ---\r
+int(0)\r
+--- testing: '123e5xyz' % ' 123abc' ---\r
+int(0)\r
+--- testing: '123e5xyz' % '123 abc' ---\r
+int(0)\r
+--- testing: '123e5xyz' % '123abc ' ---\r
+int(0)\r
+--- testing: '123e5xyz' % '3.4a' ---\r
+int(0)\r
+--- testing: '123e5xyz' % 'a5.9' ---\r
+Exception: Modulo by zero\r
+--- testing: ' 123abc' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: ' 123abc' % '65' ---\r
+int(58)\r
+--- testing: ' 123abc' % '-44' ---\r
+int(35)\r
+--- testing: ' 123abc' % '1.2' ---\r
+int(0)\r
+--- testing: ' 123abc' % '-7.7' ---\r
+int(4)\r
+--- testing: ' 123abc' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: ' 123abc' % '123abc' ---\r
+int(0)\r
+--- testing: ' 123abc' % '123e5' ---\r
+int(0)\r
+--- testing: ' 123abc' % '123e5xyz' ---\r
+int(0)\r
+--- testing: ' 123abc' % ' 123abc' ---\r
+int(0)\r
+--- testing: ' 123abc' % '123 abc' ---\r
+int(0)\r
+--- testing: ' 123abc' % '123abc ' ---\r
+int(0)\r
+--- testing: ' 123abc' % '3.4a' ---\r
+int(0)\r
+--- testing: ' 123abc' % 'a5.9' ---\r
+Exception: Modulo by zero\r
+--- testing: '123 abc' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: '123 abc' % '65' ---\r
+int(58)\r
+--- testing: '123 abc' % '-44' ---\r
+int(35)\r
+--- testing: '123 abc' % '1.2' ---\r
+int(0)\r
+--- testing: '123 abc' % '-7.7' ---\r
+int(4)\r
+--- testing: '123 abc' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: '123 abc' % '123abc' ---\r
+int(0)\r
+--- testing: '123 abc' % '123e5' ---\r
+int(0)\r
+--- testing: '123 abc' % '123e5xyz' ---\r
+int(0)\r
+--- testing: '123 abc' % ' 123abc' ---\r
+int(0)\r
+--- testing: '123 abc' % '123 abc' ---\r
+int(0)\r
+--- testing: '123 abc' % '123abc ' ---\r
+int(0)\r
+--- testing: '123 abc' % '3.4a' ---\r
+int(0)\r
+--- testing: '123 abc' % 'a5.9' ---\r
+Exception: Modulo by zero\r
+--- testing: '123abc ' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: '123abc ' % '65' ---\r
+int(58)\r
+--- testing: '123abc ' % '-44' ---\r
+int(35)\r
+--- testing: '123abc ' % '1.2' ---\r
+int(0)\r
+--- testing: '123abc ' % '-7.7' ---\r
+int(4)\r
+--- testing: '123abc ' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: '123abc ' % '123abc' ---\r
+int(0)\r
+--- testing: '123abc ' % '123e5' ---\r
+int(0)\r
+--- testing: '123abc ' % '123e5xyz' ---\r
+int(0)\r
+--- testing: '123abc ' % ' 123abc' ---\r
+int(0)\r
+--- testing: '123abc ' % '123 abc' ---\r
+int(0)\r
+--- testing: '123abc ' % '123abc ' ---\r
+int(0)\r
+--- testing: '123abc ' % '3.4a' ---\r
+int(0)\r
+--- testing: '123abc ' % 'a5.9' ---\r
+Exception: Modulo by zero\r
+--- testing: '3.4a' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: '3.4a' % '65' ---\r
+int(3)\r
+--- testing: '3.4a' % '-44' ---\r
+int(3)\r
+--- testing: '3.4a' % '1.2' ---\r
+int(0)\r
+--- testing: '3.4a' % '-7.7' ---\r
+int(3)\r
+--- testing: '3.4a' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: '3.4a' % '123abc' ---\r
+int(3)\r
+--- testing: '3.4a' % '123e5' ---\r
+int(3)\r
+--- testing: '3.4a' % '123e5xyz' ---\r
+int(3)\r
+--- testing: '3.4a' % ' 123abc' ---\r
+int(3)\r
+--- testing: '3.4a' % '123 abc' ---\r
+int(3)\r
+--- testing: '3.4a' % '123abc ' ---\r
+int(3)\r
+--- testing: '3.4a' % '3.4a' ---\r
+int(0)\r
+--- testing: '3.4a' % 'a5.9' ---\r
+Exception: Modulo by zero\r
+--- testing: 'a5.9' % '0' ---\r
+Exception: Modulo by zero\r
+--- testing: 'a5.9' % '65' ---\r
+int(0)\r
+--- testing: 'a5.9' % '-44' ---\r
+int(0)\r
+--- testing: 'a5.9' % '1.2' ---\r
+int(0)\r
+--- testing: 'a5.9' % '-7.7' ---\r
+int(0)\r
+--- testing: 'a5.9' % 'abc' ---\r
+Exception: Modulo by zero\r
+--- testing: 'a5.9' % '123abc' ---\r
+int(0)\r
+--- testing: 'a5.9' % '123e5' ---\r
+int(0)\r
+--- testing: 'a5.9' % '123e5xyz' ---\r
+int(0)\r
+--- testing: 'a5.9' % ' 123abc' ---\r
+int(0)\r
+--- testing: 'a5.9' % '123 abc' ---\r
+int(0)\r
+--- testing: 'a5.9' % '123abc ' ---\r
+int(0)\r
+--- testing: 'a5.9' % '3.4a' ---\r
+int(0)\r
+--- testing: 'a5.9' % 'a5.9' ---\r
+Exception: Modulo by zero\r
 ===DONE===\r