Example #1
0
 /**
  * @return array
  */
 public function providerDividedBy()
 {
     return [['123456789098765432101234567890987654321', 1, '123456789098765432101234567890987654321'], ['123456789098765432101234567890987654321', 2, RoundingNecessaryException::getNamespace()], ['123456789098765432101234567890987654321', 0, DivisionByZeroException::getNamespace()], ['123456789098765432101234567890987654321', 0.0, DivisionByZeroException::getNamespace()], ['123456789098765432101234567890987654321', 0.1, RoundingNecessaryException::getNamespace()], ['123456789098765432101234567890987654322', 2, '61728394549382716050617283945493827161'], ['123456789098765432101234567890987654322', 2.0, '61728394549382716050617283945493827161'], ['123456789098765432101234567890987654322', '2', '61728394549382716050617283945493827161'], ['123456789098765432101234567890987654322', '2.0', '61728394549382716050617283945493827161'], ['123456789098765432101234567890987654322', '14/7', '61728394549382716050617283945493827161'], ['61728394549382716050617283945493827161', '0.5', RoundingNecessaryException::getNamespace()], ['61728394549382716050617283945493827161', '1/2', RoundingNecessaryException::getNamespace()]];
 }
Example #2
0
 /**
  * @return array
  */
 public function providerExactlyDividedBy()
 {
     return [[1, 1, '1'], ['1.0', '1.00', '1'], [1, 2, '0.5'], [1, 3, RoundingNecessaryException::getNamespace()], [1, 4, '0.25'], [1, 5, '0.2'], [1, 6, RoundingNecessaryException::getNamespace()], [1, 7, RoundingNecessaryException::getNamespace()], [1, 8, '0.125'], [1, 9, RoundingNecessaryException::getNamespace()], [1, 10, '0.1'], ['1.0', 2, '0.5'], ['1.00', 2, '0.5'], ['1.0000', 8, '0.125'], [1, '4.000', '0.25'], ['1', '0.125', '8'], ['1.0', '0.125', '8'], ['1234.5678', '2', '617.2839'], ['1234.5678', '4', '308.64195'], ['1234.5678', '8', '154.320975'], ['1234.5678', '6.4', '192.90121875'], ['7', '3125', '0.00224'], ['4849709849456546549849846510128399', '18014398509481984', '269212976880902984.935786476657271160117801400701864622533321380615234375'], ['4849709849456546549849846510128399', '-18014398509481984', '-269212976880902984.935786476657271160117801400701864622533321380615234375'], ['-4849709849456546549849846510128399', '18014398509481984', '-269212976880902984.935786476657271160117801400701864622533321380615234375'], ['-4849709849456546549849846510128399', '-18014398509481984', '269212976880902984.935786476657271160117801400701864622533321380615234375'], ['123', '0', DivisionByZeroException::getNamespace()], [-789, '0.0', DivisionByZeroException::getNamespace()]];
 }