1--TEST-- 2bcdiv() function with large numbers 3--EXTENSIONS-- 4bcmath 5--INI-- 6bcmath.scale=0 7--FILE-- 8<?php 9require(__DIR__ . "/run_bcmath_tests_function.inc"); 10 11$dividends = [ 12 "15151324141414.412312232141241", 13 "-132132245132134.1515123765412", 14 "141241241241241248267654747412", 15 "-149143276547656984948124912", 16 "0.1322135476547459213732911312", 17 "-0.123912932193769965476541321", 18]; 19$divisors = array_merge($dividends, [ 20 "15", 21 "-15", 22 "1", 23 "-9", 24 "14.14", 25 "-16.60", 26 "0.15", 27 "-0.01", 28]); 29 30run_bcmath_tests($dividends, $divisors, "/", bcdiv(...)); 31 32?> 33--EXPECT-- 34Number "15151324141414.412312232141241" (scale 0) 3515151324141414.412312232141241 / 15151324141414.412312232141241 = 1 3615151324141414.412312232141241 / -132132245132134.1515123765412 = 0 3715151324141414.412312232141241 / 141241241241241248267654747412 = 0 3815151324141414.412312232141241 / -149143276547656984948124912 = 0 3915151324141414.412312232141241 / 0.1322135476547459213732911312 = 114597364719231 4015151324141414.412312232141241 / -0.123912932193769965476541321 = -122273953760705 4115151324141414.412312232141241 / 15 = 1010088276094 4215151324141414.412312232141241 / -15 = -1010088276094 4315151324141414.412312232141241 / 1 = 15151324141414 4415151324141414.412312232141241 / -9 = -1683480460157 4515151324141414.412312232141241 / 14.14 = 1071522216507 4615151324141414.412312232141241 / -16.60 = -912730369964 4715151324141414.412312232141241 / 0.15 = 101008827609429 4815151324141414.412312232141241 / -0.01 = -1515132414141441 49 50Number "-132132245132134.1515123765412" (scale 0) 51-132132245132134.1515123765412 / 15151324141414.412312232141241 = -8 52-132132245132134.1515123765412 / -132132245132134.1515123765412 = 1 53-132132245132134.1515123765412 / 141241241241241248267654747412 = 0 54-132132245132134.1515123765412 / -149143276547656984948124912 = 0 55-132132245132134.1515123765412 / 0.1322135476547459213732911312 = -999385066628541 56-132132245132134.1515123765412 / -0.123912932193769965476541321 = 1066331356968545 57-132132245132134.1515123765412 / 15 = -8808816342142 58-132132245132134.1515123765412 / -15 = 8808816342142 59-132132245132134.1515123765412 / 1 = -132132245132134 60-132132245132134.1515123765412 / -9 = 14681360570237 61-132132245132134.1515123765412 / 14.14 = -9344571791522 62-132132245132134.1515123765412 / -16.60 = 7959773803140 63-132132245132134.1515123765412 / 0.15 = -880881634214227 64-132132245132134.1515123765412 / -0.01 = 13213224513213415 65 66Number "141241241241241248267654747412" (scale 0) 67141241241241241248267654747412 / 15151324141414.412312232141241 = 9322039441765651 68141241241241241248267654747412 / -132132245132134.1515123765412 = -1068938479778330 69141241241241241248267654747412 / 141241241241241248267654747412 = 1 70141241241241241248267654747412 / -149143276547656984948124912 = -947 71141241241241241248267654747412 / 0.1322135476547459213732911312 = 1068281153835079546834811315187 72141241241241241248267654747412 / -0.123912932193769965476541321 = -1139842619657922251471288994015 73141241241241241248267654747412 / 15 = 9416082749416083217843649827 74141241241241241248267654747412 / -15 = -9416082749416083217843649827 75141241241241241248267654747412 / 1 = 141241241241241248267654747412 76141241241241241248267654747412 / -9 = -15693471249026805363072749712 77141241241241241248267654747412 / 14.14 = 9988772365009989269282513961 78141241241241241248267654747412 / -16.60 = -8508508508508508931786430566 79141241241241241248267654747412 / 0.15 = 941608274941608321784364982746 80141241241241241248267654747412 / -0.01 = -14124124124124124826765474741200 81 82Number "-149143276547656984948124912" (scale 0) 83-149143276547656984948124912 / 15151324141414.412312232141241 = -9843580346881 84-149143276547656984948124912 / -132132245132134.1515123765412 = 1128742468566 85-149143276547656984948124912 / 141241241241241248267654747412 = 0 86-149143276547656984948124912 / -149143276547656984948124912 = 1 87-149143276547656984948124912 / 0.1322135476547459213732911312 = -1128048367154629906735882014 88-149143276547656984948124912 / -0.123912932193769965476541321 = 1203613488174364568320268735 89-149143276547656984948124912 / 15 = -9942885103177132329874994 90-149143276547656984948124912 / -15 = 9942885103177132329874994 91-149143276547656984948124912 / 1 = -149143276547656984948124912 92-149143276547656984948124912 / -9 = 16571475171961887216458323 93-149143276547656984948124912 / 14.14 = -10547615031658909826600064 94-149143276547656984948124912 / -16.60 = 8984534731786565358320777 95-149143276547656984948124912 / 0.15 = -994288510317713232987499413 96-149143276547656984948124912 / -0.01 = 14914327654765698494812491200 97 98Number "0.1322135476547459213732911312" (scale 0) 990.1322135476547459213732911312 / 15151324141414.412312232141241 = 0 1000.1322135476547459213732911312 / -132132245132134.1515123765412 = 0 1010.1322135476547459213732911312 / 141241241241241248267654747412 = 0 1020.1322135476547459213732911312 / -149143276547656984948124912 = 0 1030.1322135476547459213732911312 / 0.1322135476547459213732911312 = 1 1040.1322135476547459213732911312 / -0.123912932193769965476541321 = -1 1050.1322135476547459213732911312 / 15 = 0 1060.1322135476547459213732911312 / -15 = 0 1070.1322135476547459213732911312 / 1 = 0 1080.1322135476547459213732911312 / -9 = 0 1090.1322135476547459213732911312 / 14.14 = 0 1100.1322135476547459213732911312 / -16.60 = 0 1110.1322135476547459213732911312 / 0.15 = 0 1120.1322135476547459213732911312 / -0.01 = -13 113 114Number "-0.123912932193769965476541321" (scale 0) 115-0.123912932193769965476541321 / 15151324141414.412312232141241 = 0 116-0.123912932193769965476541321 / -132132245132134.1515123765412 = 0 117-0.123912932193769965476541321 / 141241241241241248267654747412 = 0 118-0.123912932193769965476541321 / -149143276547656984948124912 = 0 119-0.123912932193769965476541321 / 0.1322135476547459213732911312 = 0 120-0.123912932193769965476541321 / -0.123912932193769965476541321 = 1 121-0.123912932193769965476541321 / 15 = 0 122-0.123912932193769965476541321 / -15 = 0 123-0.123912932193769965476541321 / 1 = 0 124-0.123912932193769965476541321 / -9 = 0 125-0.123912932193769965476541321 / 14.14 = 0 126-0.123912932193769965476541321 / -16.60 = 0 127-0.123912932193769965476541321 / 0.15 = 0 128-0.123912932193769965476541321 / -0.01 = 12 129 130Number "15151324141414.412312232141241" (scale 10) 13115151324141414.412312232141241 / 15151324141414.412312232141241 = 1.0000000000 13215151324141414.412312232141241 / -132132245132134.1515123765412 = -0.1146678778 13315151324141414.412312232141241 / 141241241241241248267654747412 = 0.0000000000 13415151324141414.412312232141241 / -149143276547656984948124912 = 0.0000000000 13515151324141414.412312232141241 / 0.1322135476547459213732911312 = 114597364719231.4957119169 13615151324141414.412312232141241 / -0.123912932193769965476541321 = -122273953760705.0772823300 13715151324141414.412312232141241 / 15 = 1010088276094.2941541488 13815151324141414.412312232141241 / -15 = -1010088276094.2941541488 13915151324141414.412312232141241 / 1 = 15151324141414.4123122321 14015151324141414.412312232141241 / -9 = -1683480460157.1569235813 14115151324141414.412312232141241 / 14.14 = 1071522216507.3841804973 14215151324141414.412312232141241 / -16.60 = -912730369964.7236332669 14315151324141414.412312232141241 / 0.15 = 101008827609429.4154148809 14415151324141414.412312232141241 / -0.01 = -1515132414141441.2312232141 145 146Number "-132132245132134.1515123765412" (scale 10) 147-132132245132134.1515123765412 / 15151324141414.412312232141241 = -8.7208381194 148-132132245132134.1515123765412 / -132132245132134.1515123765412 = 1.0000000000 149-132132245132134.1515123765412 / 141241241241241248267654747412 = 0.0000000000 150-132132245132134.1515123765412 / -149143276547656984948124912 = 0.0000000000 151-132132245132134.1515123765412 / 0.1322135476547459213732911312 = -999385066628541.8940917146 152-132132245132134.1515123765412 / -0.123912932193769965476541321 = 1066331356968545.9568177107 153-132132245132134.1515123765412 / 15 = -8808816342142.2767674917 154-132132245132134.1515123765412 / -15 = 8808816342142.2767674917 155-132132245132134.1515123765412 / 1 = -132132245132134.1515123765 156-132132245132134.1515123765412 / -9 = 14681360570237.1279458196 157-132132245132134.1515123765412 / 14.14 = -9344571791522.9244351044 158-132132245132134.1515123765412 / -16.60 = 7959773803140.6115368901 159-132132245132134.1515123765412 / 0.15 = -880881634214227.6767491769 160-132132245132134.1515123765412 / -0.01 = 13213224513213415.1512376541 161 162Number "141241241241241248267654747412" (scale 10) 163141241241241241248267654747412 / 15151324141414.412312232141241 = 9322039441765651.5733487418 164141241241241241248267654747412 / -132132245132134.1515123765412 = -1068938479778330.9382445997 165141241241241241248267654747412 / 141241241241241248267654747412 = 1.0000000000 166141241241241241248267654747412 / -149143276547656984948124912 = -947.0171536435 167141241241241241248267654747412 / 0.1322135476547459213732911312 = 1068281153835079546834811315187.2460414102 168141241241241241248267654747412 / -0.123912932193769965476541321 = -1139842619657922251471288994015.5745430452 169141241241241241248267654747412 / 15 = 9416082749416083217843649827.4666666666 170141241241241241248267654747412 / -15 = -9416082749416083217843649827.4666666666 171141241241241241248267654747412 / 1 = 141241241241241248267654747412.0000000000 172141241241241241248267654747412 / -9 = -15693471249026805363072749712.4444444444 173141241241241241248267654747412 / 14.14 = 9988772365009989269282513961.2446958981 174141241241241241248267654747412 / -16.60 = -8508508508508508931786430566.9879518072 175141241241241241248267654747412 / 0.15 = 941608274941608321784364982746.6666666666 176141241241241241248267654747412 / -0.01 = -14124124124124124826765474741200.0000000000 177 178Number "-149143276547656984948124912" (scale 10) 179-149143276547656984948124912 / 15151324141414.412312232141241 = -9843580346881.4246956668 180-149143276547656984948124912 / -132132245132134.1515123765412 = 1128742468566.3333472319 181-149143276547656984948124912 / 141241241241241248267654747412 = -0.0010559470 182-149143276547656984948124912 / -149143276547656984948124912 = 1.0000000000 183-149143276547656984948124912 / 0.1322135476547459213732911312 = -1128048367154629906735882014.2432613477 184-149143276547656984948124912 / -0.123912932193769965476541321 = 1203613488174364568320268735.7225301437 185-149143276547656984948124912 / 15 = -9942885103177132329874994.1333333333 186-149143276547656984948124912 / -15 = 9942885103177132329874994.1333333333 187-149143276547656984948124912 / 1 = -149143276547656984948124912.0000000000 188-149143276547656984948124912 / -9 = 16571475171961887216458323.5555555555 189-149143276547656984948124912 / 14.14 = -10547615031658909826600064.4978783592 190-149143276547656984948124912 / -16.60 = 8984534731786565358320777.8313253012 191-149143276547656984948124912 / 0.15 = -994288510317713232987499413.3333333333 192-149143276547656984948124912 / -0.01 = 14914327654765698494812491200.0000000000 193 194Number "0.1322135476547459213732911312" (scale 10) 1950.1322135476547459213732911312 / 15151324141414.412312232141241 = 0.0000000000 1960.1322135476547459213732911312 / -132132245132134.1515123765412 = 0.0000000000 1970.1322135476547459213732911312 / 141241241241241248267654747412 = 0.0000000000 1980.1322135476547459213732911312 / -149143276547656984948124912 = 0.0000000000 1990.1322135476547459213732911312 / 0.1322135476547459213732911312 = 1.0000000000 2000.1322135476547459213732911312 / -0.123912932193769965476541321 = -1.0669874831 2010.1322135476547459213732911312 / 15 = 0.0088142365 2020.1322135476547459213732911312 / -15 = -0.0088142365 2030.1322135476547459213732911312 / 1 = 0.1322135476 2040.1322135476547459213732911312 / -9 = -0.0146903941 2050.1322135476547459213732911312 / 14.14 = 0.0093503216 2060.1322135476547459213732911312 / -16.60 = -0.0079646715 2070.1322135476547459213732911312 / 0.15 = 0.8814236510 2080.1322135476547459213732911312 / -0.01 = -13.2213547654 209 210Number "-0.123912932193769965476541321" (scale 10) 211-0.123912932193769965476541321 / 15151324141414.412312232141241 = 0.0000000000 212-0.123912932193769965476541321 / -132132245132134.1515123765412 = 0.0000000000 213-0.123912932193769965476541321 / 141241241241241248267654747412 = 0.0000000000 214-0.123912932193769965476541321 / -149143276547656984948124912 = 0.0000000000 215-0.123912932193769965476541321 / 0.1322135476547459213732911312 = -0.9372181171 216-0.123912932193769965476541321 / -0.123912932193769965476541321 = 1.0000000000 217-0.123912932193769965476541321 / 15 = -0.0082608621 218-0.123912932193769965476541321 / -15 = 0.0082608621 219-0.123912932193769965476541321 / 1 = -0.1239129321 220-0.123912932193769965476541321 / -9 = 0.0137681035 221-0.123912932193769965476541321 / 14.14 = -0.0087632908 222-0.123912932193769965476541321 / -16.60 = 0.0074646344 223-0.123912932193769965476541321 / 0.15 = -0.8260862146 224-0.123912932193769965476541321 / -0.01 = 12.3912932193 225