ÿØÿà JFIF    ÿÛ „  ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ     ÿÄ H    !1AQaq"‘¡2B±ÁÑð#R“Ò Tbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz ¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡* ….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±b Lô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊ ÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ." ¤‡ú*õ'VŽ|¼´Úgllº¼klz[Æüï÷Aób‡Eÿ dÑ»Xx9ÃÜ£ÁT/`¼¸vI±Ýµ·Ë‚“G³þ*Ÿû´r|*}<¨îºœ @¦mÄ’M¹”.œ«Y–|6ÏU¤jç¥ÕÞqO ˜kDÆÁ¨5ÿ š;ÐЦ¦€GÙk \ –Þ=â¼=SͧµªS°ÚÍpÜãQűÀõ¬?ÃÁ1Ñ•õZà?hóœ€ L¦l{Y*K˜Ù›zc˜–ˆâ ø+¾ ­-Ök¥%ùEÜA'}ˆ><ÊIè“bpÍ/qÞâvoX€w,\úªò6Z[XdÒæ­@Ö—€$òJí#é>'°Ú ôª˜<)4ryÙ£|óAÅn5žêŸyÒäMÝ2{"}‰–¤l÷ûWX\l¾Á¸góÉOÔ /óñB¤f¸çñ[.P˜ZsÊË*ßT܈§QN¢’¡¨§V¼(Üù*eÕ“”5T¨‹Âê¥FŒã½Dü[8'Ò¥a…Ú¶k7a *•›¼'Ò·\8¨ª\@\õ¢¦íq+DÙrmÎ…_ªæ»ŠÓœ¡¯’Ré9MÅ×D™lælffc+ŒÑ,ý™ÿ ¯þǤ=Å’Á7µ÷ÚÛ/“Ü€ñýã¼àí¾ÕÑ+ƒ,uµMâÀÄbm:ÒÎPæ{˜Gz[ƒ¯«® KHà`ߨŠéí¯P8Aq.C‰ à€kòpj´kN¶qô€…Õ,ÜNŠª-­{Zö’æû44‰sŽè‰îVíRœÕm" 6?³D9¡ÇTíÅꋇ`4«¸ÝÁô ï’ýorqКÇZ«x4Žâéþuïf¹µö[P ,Q£éaX±`PÉÍZ ¸äYúg üAx ’6Lê‚xÝÓ*äQ  Ï’¨hÍ =²,6ï#rÃ<¯–£»ƒ‹,–ê•€ aÛsñ'%Æ"®ÛüìBᝠHÚ3ß°©$“XnœÖ’î2ËTeûìxîß ¦å¿çÉ ðK§þ{‘t‚Ϋ¬jéîZ[ ”š7L¥4VÚCE×]m¤Øy”ä4-dz£œ§¸x.*ãÊÊ b÷•h:©‡¦s`BTÁRû¾g⻩‹jø sF¢àJøFl‘È•Xᓁà~*j¯ +(ÚÕ6-£¯÷GŠØy‚<Ç’.F‹Hœw(+)ÜÜâÈzÄäT§FߘãÏ;DmVœ3Àu@mÚüXÝü•3B¨òÌÁÛ<·ÃÜ z,Ì@õÅ·d2]ü8s÷IôÞ¯^Ç9¢u„~ëAŸï4«M? K]­ÅàPl@s_ p:°¬ZR”´›JC[CS.h‹ƒïËœ«Æ]–÷ó‚wR×k7X‰k›‘´ù¦=¡«‰¨¨Â')—71ó’c‡Ðúµ `é.{§p¹ój\Ž{1h{o±Ý=áUÊïGÖŒõ–-BÄm+AZX¶¡ ïHðæ¥JmÙ;…䡟ˆ¦ ° äšiÉg«$üMk5¤L“’çÊvïâï ,=f“"íἊ5ô¬x6{ɏžID0e¸vçmi'︧ºð9$ò¹÷*£’9ÿ ²TÔ…×>JV¥}Œ}$p[bÔ®*[jzS*8 ”·T›Í–ñUîƒwo$áè=LT™ç—~ô·¤ÈÚ$榍q‰„+´kFm)ž‹©i–ËqÞŠ‰à¶ü( ‚•§ •°ò·‡#5ª•µÊ﯅¡X¨šÁ*F#TXJÊ ušJVÍ&=iÄs1‚3•'fý§5Ñ<=[íÞ­ PÚ;ѱÌ_~Ä££8rÞ ²w;’hDT°>ÈG¬8Á²ÚzŽ®ò®qZcqJêäÞ-ö[ܘbň±çb“ж31²n×iƒðÕ;1¶þÉ ªX‰,ßqÏ$>•î íZ¥Z 1{ç൵+ƒÕµ¥°T$§K]á»Ûï*·¤tMI’ÂZbŽÕiÒ˜}bÓ0£ª5›¨ [5Ž^ÝœWøÂÝh° ¢OWun£¤5 a2Z.G2³YL]jåtì”ä ÁÓ‘%"©<Ôúʰsº UZvä‡ÄiÆÒM .÷V·™ø#kèýiíÌ–ª)µT[)BˆõÑ xB¾B€ÖT¨.¥~ð@VĶr#¸ü*åZNDŽH;âi ],©£öØpù(šºãö¼T.uCê•4@ÿ GÕÛ)Cx›®0ø#:ÏðFÒbR\(€€Ä®fã4Þ‰Fä¯HXƒÅ,†öEÑÔÜ]Öv²?tLÃvBY£ú6Êu5ÅAQ³1‘’¬x–HŒÐ‡ ^ ¸KwJôÖŽ5×CÚ¨vÜ«/B0$×k°=ðbÇ(Ï)w±A†Á† 11Í=èQšµ626ŒÜ/`G«µ<}—-Ö7KEHÈÉðóȤmݱû±·ø«Snmá=“䫚mݱŸ¡¶~ó·“äUóJæúòB|E LêŽy´jDÔ$G¢þÐñ7óR8ýÒ…Ç› WVe#·Ÿ p·Fx~•ݤF÷0Èÿ K¯æS<6’¡WШ; ´ÿ ¥Êø\Òuî†åÝ–VNœkÒ7oòX¨Á­Ø÷FÎÑä±g÷ÿ M~Çî=p,X´ ÝÌÚÅ‹’ÃjÖ.ØöÏñ qïQ¤ÓZE†° =6·]܈ s¸>v•Ž^Ý\wq9r‰Î\¸¡kURÒ$­*‹Nq?Þª*!sŠÆ:TU_u±T+øX¡ ®¹¡,ÄâÃBTsÜ$Ø›4m椴zÜK]’’›Pƒ @€#â˜`é¹=I‡fiV•Ôî“nRm+µFPOhÍ0B£ €+¬5c v•:P'ÒyÎ ‰V~‚Ó†ÖuókDoh$å\*ö%Ю=£«…aȼ½÷Û.-½VŒŠ¼'lyî±1¬3ó#ÞE¿ÔS¤gV£m›=§\û"—WU¤ÚǼÿ ÂnÁGŒÃ ‚õN D³õNÚíŒÕ;HôyÄÈ©P¹Ä{:?R‘Ô¨âF÷ø£bÅó® JS|‚R÷ivýáâ€Æé¡è³´IئÑT!§˜•ت‚¬â@q€wnïCWÄ@JU€ê¯m6]Ï:£âx'+ÒðXvÓ¦Úm=–´7œ $ì“B£~p%ÕŸUþ« N@¼üï~w˜ñø5®—'Ôe»¤5ã//€ž~‰Tþ›Å7•#¤× Íö pÄ$ùeåì*«ÓŠEØWEÈsßg ¦ûvžSsLpºÊW–âµEWöˬH; ™!CYõZ ÃÄf æ#1W. \uWâ\,\Çf j’<qTbên›Î[vxx£ë 'ö¨1›˜ÀM¼Pÿ H)ƒêêŒA7s,|F“ 꺸k³9Ìö*ç®;Ö!Ö$Eiž•¹ÒÚ†ýóéÝû¾ÕS®ó$’NÝäŸz¤5r¦ãÄÃD÷Üø!°ø‡Ô&@m™Ì^Ãä­d q5Lnÿ N;.6½·N|#ä"1Nƒx“ã<3('&ñßt  ~ªu”1Tb㫨9ê–›–bìd$ߣ=#ÕãÒmU¯eí$EFù5ýYô櫨æì™Ç—±ssM]·á¿0ÕåJRÓªîiƒ+O58ÖñªŠÒx" \µâá¨i’¤i —Ö ” M+M¤ë9‚‰A¦°Qõ¾ßøK~¼Ã‘g…Ö´~÷Ï[3GUœÒ½#…kàÔ®Ò”‰³·dWV‰IP‰Ú8u¹”E ÖqLj¾êÕCBš{A^Âß;–¨`¯¬ìö ˼ ×tìø.tƐm*n¨y4o&Àx¥n¦×î‡aupáÛj8¿m›è¶ã!o½;ß0y^ý×^EÑ¿ÒjzŒ­)vÚÑnÄL …^ªô× ‡—‚3k Îý­hï]içå–îÏ*÷ñþ»Ô CÒjøjÍznˆ´ ¹#b'Fô‹ ‰v¥'’à'T´ƒHýÍ%M‰ ƒ&ÆÇŒï1 ‘ –Þ ‰i¬s žR-Ÿ kЬá¬7:þ 0ŒÅÒÕ/aÙ¬ÃÝ#Úøœ ©aiVc‰. ¹¦ãµ” ›Yg¦›ÆÎýº°f³7ƒhá·¸­}&D9¡ÂsÉÙÞèŠõØàC™¨ñbFC|´Ü(ŸƒÚÒ-%»'a Ì¿)ËÇn¿úÿ ÞŽX…4ÊÅH^ôΑí@ù¹Eh¶“L8Çjù ¼ÎåVªóR©Ï5uà V4lZß®=€xÖŸ–ÑÈ ÷”¨°¾__yM1tÉ?uÆþIkÄgæ@þ[¢†°XÃJ£j·:nkÅ¢u ‘}âGzö­/IµèЬ¼48q¦F°ŽR¼=ûì{´¯RýicS ÕÛ íNtÍÙï£,w4rêì®»~x(©Uñ§#Ñ&œÕ¤>ÎåÍÓ9’Ö{9eV­[Öjâ²ãu]˜å2›qÑšÕJç0€sÄ|Êëè0튔bÁ>“{×_F`Ø©ºê:µä,v¤ðfc1±"«ÔÍän1#=· Âøv~H½ÐßA¾¿Ü€Óš]Õ; I¾÷ç‚Qi†î¹9ywÔKG˜áñ zQY—§ÃÕZ07§X‚ Áh;ÁM)iÌCH-¯T‘ë|A0{Ò½LÚ–TâÖkÜ’dÀ“rmm»”جPF³ÖcbE§T€ÒxKºû’Ó®7±²(\4ŽÃ¸Uu@j™yĵ;³µ!Á¢b.W¤=mõ´êµK k ¸K^ÜÛ#p*Ü14qkZç5ïë †°5Ï%ÍÛ<Õ¤×Ô¥ê†C Õ´¼ú$ƒÖ“”]Ù¬qÞÚ[4©ý!ûÏ—Áb쳐XµA¬â~`›Çr¸8ìùÝ䫦<>ä÷«?xs´ÇÑ /á;¹øüÊÈÙà{"@Žïzâ¬[âß‚ U_<ÇŸ½4èN˜ú61®qŠu ¦þF£»äJ_ˆÙÎ~ ÞAã–݄ϗrŠD;xTž‘ô`É«…suãO`?³à™ô Lý#Íc5öoæØ‚y´´÷«ZR§<&JÇ+éâô´€i!Àˆ0æAoàðLèÖ-2ŸõW.’t^–(KÁmHµV@xÜÇy®Ñø­â^:Ú3w· 7½¹°ñ¸â¹®:',«Mœ—n­Á+Ãbš LÈ‘ÄnRÓÅœ%¦²‰¨ùQ:¤f‚ "PÕtô¸…cæl…&˜Ú˜Ôkv‹ž+vŠ,=¢v­6—Xy*¥t£«<™:“aîϲ=¦6rO]XI¿Œ÷¤zÚ­›¶ 6÷”w\d ü~v®ˆÌk«^m<ÿ ¢‰Õ\)ùºŽ;… lîÙÅEŠ®cѾ@vnMÏ,¼“ñ•ŽBxðÃzãÇç%3ˆ"}Ù•Åî> BÉú;Ò]V+P˜F_´ßé> Øše|ï‡ÄOmFæÇ ãqÞ$/xÐx­z`ï9"œÜij‚!7.\Td…9M‡•iŽ‹¾‘50ÞŽn¥ß4ÉôO ¹*í^QêËÜÇÌ8=ާs‰'ÂëÙ«á%Pú[O †ÅP¯Vsް.‰,kc¶ ¬A9n˜XÎ-ÞšN["¹QÕ‰ƒMýÁߺXJæÍaLj¾×Ãmã¾ãÚ uñÒþåQô¦¥ /ÄUx:‚ÍÜ’ Đ©ØÝ3V¨‰ÕnÐ6ó*óúK­«…c ¯U òhsý­jóÔj#,ímŒRµ«lbïUTŒÑ8†Ä0œÏr`ð¡¬É Ї ë"À² ™ 6¥ f¶ ¢ÚoܱԷ-<Àî)†a¶ž'Ú»¨TXqØæ¶÷YÄHy˜9ÈIW­YÀuMFë ºÏ’AqÌ4·/Ú †ô'i$øä­=Ä Ý|öK×40è|È6p‘0§)o¥ctî§H+CA-“ xØ|ÐXАç l8íºð3Ø:³¤¬KX¯UÿÙ # Changelog All notable changes to this project will be documented in this file. ## [0.9.3](https://github.com/brick/math/releases/tag/0.9.3) - 2021-08-15 🚀 **Compatibility with PHP 8.1** - Support for custom object serialization; this removes a warning on PHP 8.1 due to the `Serializable` interface being deprecated (thanks @TRowbotham) ## [0.9.2](https://github.com/brick/math/releases/tag/0.9.2) - 2021-01-20 🐛 **Bug fix** - Incorrect results could be returned when using the BCMath calculator, with a default scale set with `bcscale()`, on PHP >= 7.2 (#55). ## [0.9.1](https://github.com/brick/math/releases/tag/0.9.1) - 2020-08-19 ✨ New features - `BigInteger::not()` returns the bitwise `NOT` value 🐛 **Bug fixes** - `BigInteger::toBytes()` could return an incorrect binary representation for some numbers - The bitwise operations `and()`, `or()`, `xor()` on `BigInteger` could return an incorrect result when the GMP extension is not available ## [0.9.0](https://github.com/brick/math/releases/tag/0.9.0) - 2020-08-18 👌 **Improvements** - `BigNumber::of()` now accepts `.123` and `123.` formats, both of which return a `BigDecimal` 💥 **Breaking changes** - Deprecated method `BigInteger::powerMod()` has been removed - use `modPow()` instead - Deprecated method `BigInteger::parse()` has been removed - use `fromBase()` instead ## [0.8.17](https://github.com/brick/math/releases/tag/0.8.17) - 2020-08-19 🐛 **Bug fix** - `BigInteger::toBytes()` could return an incorrect binary representation for some numbers - The bitwise operations `and()`, `or()`, `xor()` on `BigInteger` could return an incorrect result when the GMP extension is not available ## [0.8.16](https://github.com/brick/math/releases/tag/0.8.16) - 2020-08-18 🚑 **Critical fix** - This version reintroduces the deprecated `BigInteger::parse()` method, that has been removed by mistake in version `0.8.9` and should have lasted for the whole `0.8` release cycle. ✨ **New features** - `BigInteger::modInverse()` calculates a modular multiplicative inverse - `BigInteger::fromBytes()` creates a `BigInteger` from a byte string - `BigInteger::toBytes()` converts a `BigInteger` to a byte string - `BigInteger::randomBits()` creates a pseudo-random `BigInteger` of a given bit length - `BigInteger::randomRange()` creates a pseudo-random `BigInteger` between two bounds 💩 **Deprecations** - `BigInteger::powerMod()` is now deprecated in favour of `modPow()` ## [0.8.15](https://github.com/brick/math/releases/tag/0.8.15) - 2020-04-15 🐛 **Fixes** - added missing `ext-json` requirement, due to `BigNumber` implementing `JsonSerializable` ⚡️ **Optimizations** - additional optimization in `BigInteger::remainder()` ## [0.8.14](https://github.com/brick/math/releases/tag/0.8.14) - 2020-02-18 ✨ **New features** - `BigInteger::getLowestSetBit()` returns the index of the rightmost one bit ## [0.8.13](https://github.com/brick/math/releases/tag/0.8.13) - 2020-02-16 ✨ **New features** - `BigInteger::isEven()` tests whether the number is even - `BigInteger::isOdd()` tests whether the number is odd - `BigInteger::testBit()` tests if a bit is set - `BigInteger::getBitLength()` returns the number of bits in the minimal representation of the number ## [0.8.12](https://github.com/brick/math/releases/tag/0.8.12) - 2020-02-03 🛠️ **Maintenance release** Classes are now annotated for better static analysis with [psalm](https://psalm.dev/). This is a maintenance release: no bug fixes, no new features, no breaking changes. ## [0.8.11](https://github.com/brick/math/releases/tag/0.8.11) - 2020-01-23 ✨ **New feature** `BigInteger::powerMod()` performs a power-with-modulo operation. Useful for crypto. ## [0.8.10](https://github.com/brick/math/releases/tag/0.8.10) - 2020-01-21 ✨ **New feature** `BigInteger::mod()` returns the **modulo** of two numbers. The *modulo* differs from the *remainder* when the signs of the operands are different. ## [0.8.9](https://github.com/brick/math/releases/tag/0.8.9) - 2020-01-08 ⚡️ **Performance improvements** A few additional optimizations in `BigInteger` and `BigDecimal` when one of the operands can be returned as is. Thanks to @tomtomsen in #24. ## [0.8.8](https://github.com/brick/math/releases/tag/0.8.8) - 2019-04-25 🐛 **Bug fixes** - `BigInteger::toBase()` could return an empty string for zero values (BCMath & Native calculators only, GMP calculator unaffected) ✨ **New features** - `BigInteger::toArbitraryBase()` converts a number to an arbitrary base, using a custom alphabet - `BigInteger::fromArbitraryBase()` converts a string in an arbitrary base, using a custom alphabet, back to a number These methods can be used as the foundation to convert strings between different bases/alphabets, using BigInteger as an intermediate representation. 💩 **Deprecations** - `BigInteger::parse()` is now deprecated in favour of `fromBase()` `BigInteger::fromBase()` works the same way as `parse()`, with 2 minor differences: - the `$base` parameter is required, it does not default to `10` - it throws a `NumberFormatException` instead of an `InvalidArgumentException` when the number is malformed ## [0.8.7](https://github.com/brick/math/releases/tag/0.8.7) - 2019-04-20 **Improvements** - Safer conversion from `float` when using custom locales - **Much faster** `NativeCalculator` implementation 🚀 You can expect **at least a 3x performance improvement** for common arithmetic operations when using the library on systems without GMP or BCMath; it gets exponentially faster on multiplications with a high number of digits. This is due to calculations now being performed on whole blocks of digits (the block size depending on the platform, 32-bit or 64-bit) instead of digit-by-digit as before. ## [0.8.6](https://github.com/brick/math/releases/tag/0.8.6) - 2019-04-11 **New method** `BigNumber::sum()` returns the sum of one or more numbers. ## [0.8.5](https://github.com/brick/math/releases/tag/0.8.5) - 2019-02-12 **Bug fix**: `of()` factory methods could fail when passing a `float` in environments using a `LC_NUMERIC` locale with a decimal separator other than `'.'` (#20). Thanks @manowark 👍 ## [0.8.4](https://github.com/brick/math/releases/tag/0.8.4) - 2018-12-07 **New method** `BigDecimal::sqrt()` calculates the square root of a decimal number, to a given scale. ## [0.8.3](https://github.com/brick/math/releases/tag/0.8.3) - 2018-12-06 **New method** `BigInteger::sqrt()` calculates the square root of a number (thanks @peter279k). **New exception** `NegativeNumberException` is thrown when calling `sqrt()` on a negative number. ## [0.8.2](https://github.com/brick/math/releases/tag/0.8.2) - 2018-11-08 **Performance update** - Further improvement of `toInt()` performance - `NativeCalculator` can now perform some multiplications more efficiently ## [0.8.1](https://github.com/brick/math/releases/tag/0.8.1) - 2018-11-07 Performance optimization of `toInt()` methods. ## [0.8.0](https://github.com/brick/math/releases/tag/0.8.0) - 2018-10-13 **Breaking changes** The following deprecated methods have been removed. Use the new method name instead: | Method removed | Replacement method | | --- | --- | | `BigDecimal::getIntegral()` | `BigDecimal::getIntegralPart()` | | `BigDecimal::getFraction()` | `BigDecimal::getFractionalPart()` | --- **New features** `BigInteger` has been augmented with 5 new methods for bitwise operations: | New method | Description | | --- | --- | | `and()` | performs a bitwise `AND` operation on two numbers | | `or()` | performs a bitwise `OR` operation on two numbers | | `xor()` | performs a bitwise `XOR` operation on two numbers | | `shiftedLeft()` | returns the number shifted left by a number of bits | | `shiftedRight()` | returns the number shifted right by a number of bits | Thanks to @DASPRiD 👍 ## [0.7.3](https://github.com/brick/math/releases/tag/0.7.3) - 2018-08-20 **New method:** `BigDecimal::hasNonZeroFractionalPart()` **Renamed/deprecated methods:** - `BigDecimal::getIntegral()` has been renamed to `getIntegralPart()` and is now deprecated - `BigDecimal::getFraction()` has been renamed to `getFractionalPart()` and is now deprecated ## [0.7.2](https://github.com/brick/math/releases/tag/0.7.2) - 2018-07-21 **Performance update** `BigInteger::parse()` and `toBase()` now use GMP's built-in base conversion features when available. ## [0.7.1](https://github.com/brick/math/releases/tag/0.7.1) - 2018-03-01 This is a maintenance release, no code has been changed. - When installed with `--no-dev`, the autoloader does not autoload tests anymore - Tests and other files unnecessary for production are excluded from the dist package This will help make installations more compact. ## [0.7.0](https://github.com/brick/math/releases/tag/0.7.0) - 2017-10-02 Methods renamed: - `BigNumber:sign()` has been renamed to `getSign()` - `BigDecimal::unscaledValue()` has been renamed to `getUnscaledValue()` - `BigDecimal::scale()` has been renamed to `getScale()` - `BigDecimal::integral()` has been renamed to `getIntegral()` - `BigDecimal::fraction()` has been renamed to `getFraction()` - `BigRational::numerator()` has been renamed to `getNumerator()` - `BigRational::denominator()` has been renamed to `getDenominator()` Classes renamed: - `ArithmeticException` has been renamed to `MathException` ## [0.6.2](https://github.com/brick/math/releases/tag/0.6.2) - 2017-10-02 The base class for all exceptions is now `MathException`. `ArithmeticException` has been deprecated, and will be removed in 0.7.0. ## [0.6.1](https://github.com/brick/math/releases/tag/0.6.1) - 2017-10-02 A number of methods have been renamed: - `BigNumber:sign()` is deprecated; use `getSign()` instead - `BigDecimal::unscaledValue()` is deprecated; use `getUnscaledValue()` instead - `BigDecimal::scale()` is deprecated; use `getScale()` instead - `BigDecimal::integral()` is deprecated; use `getIntegral()` instead - `BigDecimal::fraction()` is deprecated; use `getFraction()` instead - `BigRational::numerator()` is deprecated; use `getNumerator()` instead - `BigRational::denominator()` is deprecated; use `getDenominator()` instead The old methods will be removed in version 0.7.0. ## [0.6.0](https://github.com/brick/math/releases/tag/0.6.0) - 2017-08-25 - Minimum PHP version is now [7.1](https://gophp71.org/); for PHP 5.6 and PHP 7.0 support, use version `0.5` - Deprecated method `BigDecimal::withScale()` has been removed; use `toScale()` instead - Method `BigNumber::toInteger()` has been renamed to `toInt()` ## [0.5.4](https://github.com/brick/math/releases/tag/0.5.4) - 2016-10-17 `BigNumber` classes now implement [JsonSerializable](http://php.net/manual/en/class.jsonserializable.php). The JSON output is always a string. ## [0.5.3](https://github.com/brick/math/releases/tag/0.5.3) - 2016-03-31 This is a bugfix release. Dividing by a negative power of 1 with the same scale as the dividend could trigger an incorrect optimization which resulted in a wrong result. See #6. ## [0.5.2](https://github.com/brick/math/releases/tag/0.5.2) - 2015-08-06 The `$scale` parameter of `BigDecimal::dividedBy()` is now optional again. ## [0.5.1](https://github.com/brick/math/releases/tag/0.5.1) - 2015-07-05 **New method: `BigNumber::toScale()`** This allows to convert any `BigNumber` to a `BigDecimal` with a given scale, using rounding if necessary. ## [0.5.0](https://github.com/brick/math/releases/tag/0.5.0) - 2015-07-04 **New features** - Common `BigNumber` interface for all classes, with the following methods: - `sign()` and derived methods (`isZero()`, `isPositive()`, ...) - `compareTo()` and derived methods (`isEqualTo()`, `isGreaterThan()`, ...) that work across different `BigNumber` types - `toBigInteger()`, `toBigDecimal()`, `toBigRational`() conversion methods - `toInteger()` and `toFloat()` conversion methods to native types - Unified `of()` behaviour: every class now accepts any type of number, provided that it can be safely converted to the current type - New method: `BigDecimal::exactlyDividedBy()`; this method automatically computes the scale of the result, provided that the division yields a finite number of digits - New methods: `BigRational::quotient()` and `remainder()` - Fine-grained exceptions: `DivisionByZeroException`, `RoundingNecessaryException`, `NumberFormatException` - Factory methods `zero()`, `one()` and `ten()` available in all classes - Rounding mode reintroduced in `BigInteger::dividedBy()` This release also comes with many performance improvements. --- **Breaking changes** - `BigInteger`: - `getSign()` is renamed to `sign()` - `toString()` is renamed to `toBase()` - `BigInteger::dividedBy()` now throws an exception by default if the remainder is not zero; use `quotient()` to get the previous behaviour - `BigDecimal`: - `getSign()` is renamed to `sign()` - `getUnscaledValue()` is renamed to `unscaledValue()` - `getScale()` is renamed to `scale()` - `getIntegral()` is renamed to `integral()` - `getFraction()` is renamed to `fraction()` - `divideAndRemainder()` is renamed to `quotientAndRemainder()` - `dividedBy()` now takes a **mandatory** `$scale` parameter **before** the rounding mode - `toBigInteger()` does not accept a `$roundingMode` parameter any more - `toBigRational()` does not simplify the fraction any more; explicitly add `->simplified()` to get the previous behaviour - `BigRational`: - `getSign()` is renamed to `sign()` - `getNumerator()` is renamed to `numerator()` - `getDenominator()` is renamed to `denominator()` - `of()` is renamed to `nd()`, while `parse()` is renamed to `of()` - Miscellaneous: - `ArithmeticException` is moved to an `Exception\` sub-namespace - `of()` factory methods now throw `NumberFormatException` instead of `InvalidArgumentException` ## [0.4.3](https://github.com/brick/math/releases/tag/0.4.3) - 2016-03-31 Backport of two bug fixes from the 0.5 branch: - `BigInteger::parse()` did not always throw `InvalidArgumentException` as expected - Dividing by a negative power of 1 with the same scale as the dividend could trigger an incorrect optimization which resulted in a wrong result. See #6. ## [0.4.2](https://github.com/brick/math/releases/tag/0.4.2) - 2015-06-16 New method: `BigDecimal::stripTrailingZeros()` ## [0.4.1](https://github.com/brick/math/releases/tag/0.4.1) - 2015-06-12 Introducing a `BigRational` class, to perform calculations on fractions of any size. ## [0.4.0](https://github.com/brick/math/releases/tag/0.4.0) - 2015-06-12 Rounding modes have been removed from `BigInteger`, and are now a concept specific to `BigDecimal`. `BigInteger::dividedBy()` now always returns the quotient of the division. ## [0.3.5](https://github.com/brick/math/releases/tag/0.3.5) - 2016-03-31 Backport of two bug fixes from the 0.5 branch: - `BigInteger::parse()` did not always throw `InvalidArgumentException` as expected - Dividing by a negative power of 1 with the same scale as the dividend could trigger an incorrect optimization which resulted in a wrong result. See #6. ## [0.3.4](https://github.com/brick/math/releases/tag/0.3.4) - 2015-06-11 New methods: - `BigInteger::remainder()` returns the remainder of a division only - `BigInteger::gcd()` returns the greatest common divisor of two numbers ## [0.3.3](https://github.com/brick/math/releases/tag/0.3.3) - 2015-06-07 Fix `toString()` not handling negative numbers. ## [0.3.2](https://github.com/brick/math/releases/tag/0.3.2) - 2015-06-07 `BigInteger` and `BigDecimal` now have a `getSign()` method that returns: - `-1` if the number is negative - `0` if the number is zero - `1` if the number is positive ## [0.3.1](https://github.com/brick/math/releases/tag/0.3.1) - 2015-06-05 Minor performance improvements ## [0.3.0](https://github.com/brick/math/releases/tag/0.3.0) - 2015-06-04 The `$roundingMode` and `$scale` parameters have been swapped in `BigDecimal::dividedBy()`. ## [0.2.2](https://github.com/brick/math/releases/tag/0.2.2) - 2015-06-04 Stronger immutability guarantee for `BigInteger` and `BigDecimal`. So far, it would have been possible to break immutability of these classes by calling the `unserialize()` internal function. This release fixes that. ## [0.2.1](https://github.com/brick/math/releases/tag/0.2.1) - 2015-06-02 Added `BigDecimal::divideAndRemainder()` ## [0.2.0](https://github.com/brick/math/releases/tag/0.2.0) - 2015-05-22 - `min()` and `max()` do not accept an `array` any more, but a variable number of parameters - **minimum PHP version is now 5.6** - continuous integration with PHP 7 ## [0.1.1](https://github.com/brick/math/releases/tag/0.1.1) - 2014-09-01 - Added `BigInteger::power()` - Added HHVM support ## [0.1.0](https://github.com/brick/math/releases/tag/0.1.0) - 2014-08-31 First beta release.