STLExtract 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1967) hide show
  1. data/.gitignore +14 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE.txt +22 -0
  4. data/README.md +66 -0
  5. data/Rakefile +2 -0
  6. data/STLExtract-0.0.1.gem +0 -0
  7. data/STLExtract.gemspec +23 -0
  8. data/Slic3r/Linux/bin/slic3r +0 -0
  9. data/Slic3r/Linux/dll/libGLU.so +1 -0
  10. data/Slic3r/Linux/dll/libGLU.so.1 +1 -0
  11. data/Slic3r/Linux/dll/libGLU.so.1.3.08004 +0 -0
  12. data/Slic3r/Linux/dll/libperl.so +0 -0
  13. data/Slic3r/Linux/dll/libwx_baseu-2.9.so +1 -0
  14. data/Slic3r/Linux/dll/libwx_baseu-2.9.so.3 +1 -0
  15. data/Slic3r/Linux/dll/libwx_baseu-2.9.so.3.0.0 +0 -0
  16. data/Slic3r/Linux/dll/libwx_baseu_net-2.9.so +1 -0
  17. data/Slic3r/Linux/dll/libwx_baseu_net-2.9.so.3 +1 -0
  18. data/Slic3r/Linux/dll/libwx_baseu_net-2.9.so.3.0.0 +0 -0
  19. data/Slic3r/Linux/dll/libwx_gtk2u_adv-2.9.so +1 -0
  20. data/Slic3r/Linux/dll/libwx_gtk2u_adv-2.9.so.3 +1 -0
  21. data/Slic3r/Linux/dll/libwx_gtk2u_adv-2.9.so.3.0.0 +0 -0
  22. data/Slic3r/Linux/dll/libwx_gtk2u_core-2.9.so +1 -0
  23. data/Slic3r/Linux/dll/libwx_gtk2u_core-2.9.so.3 +1 -0
  24. data/Slic3r/Linux/dll/libwx_gtk2u_core-2.9.so.3.0.0 +0 -0
  25. data/Slic3r/Linux/dll/libwx_gtk2u_gl-2.9.so +1 -0
  26. data/Slic3r/Linux/dll/libwx_gtk2u_gl-2.9.so.3 +1 -0
  27. data/Slic3r/Linux/dll/libwx_gtk2u_gl-2.9.so.3.0.0 +0 -0
  28. data/Slic3r/Linux/dll/libwx_gtk2u_html-2.9.so +1 -0
  29. data/Slic3r/Linux/dll/libwx_gtk2u_html-2.9.so.3 +1 -0
  30. data/Slic3r/Linux/dll/libwx_gtk2u_html-2.9.so.3.0.0 +0 -0
  31. data/Slic3r/Linux/lib/std/Authen/SASL.pm +130 -0
  32. data/Slic3r/Linux/lib/std/Authen/SASL/CRAM_MD5.pm +18 -0
  33. data/Slic3r/Linux/lib/std/Authen/SASL/EXTERNAL.pm +18 -0
  34. data/Slic3r/Linux/lib/std/Authen/SASL/Perl.pm +344 -0
  35. data/Slic3r/Linux/lib/std/Authen/SASL/Perl/ANONYMOUS.pm +93 -0
  36. data/Slic3r/Linux/lib/std/Authen/SASL/Perl/CRAM_MD5.pm +105 -0
  37. data/Slic3r/Linux/lib/std/Authen/SASL/Perl/DIGEST_MD5.pm +877 -0
  38. data/Slic3r/Linux/lib/std/Authen/SASL/Perl/EXTERNAL.pm +97 -0
  39. data/Slic3r/Linux/lib/std/Authen/SASL/Perl/GSSAPI.pm +375 -0
  40. data/Slic3r/Linux/lib/std/Authen/SASL/Perl/LOGIN.pm +216 -0
  41. data/Slic3r/Linux/lib/std/Authen/SASL/Perl/PLAIN.pm +182 -0
  42. data/Slic3r/Linux/lib/std/B.pm +1202 -0
  43. data/Slic3r/Linux/lib/std/B/Deparse.pm +4900 -0
  44. data/Slic3r/Linux/lib/std/CPAN/Config.pm +55 -0
  45. data/Slic3r/Linux/lib/std/Cava/Global.pm +20 -0
  46. data/Slic3r/Linux/lib/std/Cava/Project.pm +19 -0
  47. data/Slic3r/Linux/lib/std/Class/Accessor.pm +744 -0
  48. data/Slic3r/Linux/lib/std/Class/Method/Modifiers.pm +481 -0
  49. data/Slic3r/Linux/lib/std/Class/Struct.pm +636 -0
  50. data/Slic3r/Linux/lib/std/Class/XSAccessor.pm +326 -0
  51. data/Slic3r/Linux/lib/std/Class/XSAccessor/Heavy.pm +76 -0
  52. data/Slic3r/Linux/lib/std/Compress/Raw/Bzip2.pm +361 -0
  53. data/Slic3r/Linux/lib/std/Compress/Raw/Zlib.pm +1429 -0
  54. data/Slic3r/Linux/lib/std/Config.pm +110 -0
  55. data/Slic3r/Linux/lib/std/Config_git.pl +12 -0
  56. data/Slic3r/Linux/lib/std/Config_heavy.pl +1355 -0
  57. data/Slic3r/Linux/lib/std/Crypt/CBC.pm +1050 -0
  58. data/Slic3r/Linux/lib/std/Crypt/SSLeay.pm +457 -0
  59. data/Slic3r/Linux/lib/std/Crypt/SSLeay/CTX.pm +4 -0
  60. data/Slic3r/Linux/lib/std/Crypt/SSLeay/Conn.pm +4 -0
  61. data/Slic3r/Linux/lib/std/Crypt/SSLeay/Err.pm +4 -0
  62. data/Slic3r/Linux/lib/std/Crypt/SSLeay/MainContext.pm +42 -0
  63. data/Slic3r/Linux/lib/std/Crypt/SSLeay/X509.pm +26 -0
  64. data/Slic3r/Linux/lib/std/Cwd.pm +855 -0
  65. data/Slic3r/Linux/lib/std/Data/Dumper.pm +1306 -0
  66. data/Slic3r/Linux/lib/std/Data/UUID.pm +204 -0
  67. data/Slic3r/Linux/lib/std/Devel/GlobalDestruction.pm +110 -0
  68. data/Slic3r/Linux/lib/std/Digest/HMAC.pm +120 -0
  69. data/Slic3r/Linux/lib/std/Digest/HMAC_MD5.pm +71 -0
  70. data/Slic3r/Linux/lib/std/Digest/MD5.pm +376 -0
  71. data/Slic3r/Linux/lib/std/Digest/SHA.pm +701 -0
  72. data/Slic3r/Linux/lib/std/Digest/base.pm +100 -0
  73. data/Slic3r/Linux/lib/std/Encode.pm +977 -0
  74. data/Slic3r/Linux/lib/std/Encode/Alias.pm +384 -0
  75. data/Slic3r/Linux/lib/std/Encode/Byte.pm +120 -0
  76. data/Slic3r/Linux/lib/std/Encode/CJKConstants.pm +66 -0
  77. data/Slic3r/Linux/lib/std/Encode/CN.pm +74 -0
  78. data/Slic3r/Linux/lib/std/Encode/CN/HZ.pm +198 -0
  79. data/Slic3r/Linux/lib/std/Encode/Config.pm +170 -0
  80. data/Slic3r/Linux/lib/std/Encode/EBCDIC.pm +45 -0
  81. data/Slic3r/Linux/lib/std/Encode/Encoder.pm +253 -0
  82. data/Slic3r/Linux/lib/std/Encode/Encoding.pm +360 -0
  83. data/Slic3r/Linux/lib/std/Encode/GSM0338.pm +292 -0
  84. data/Slic3r/Linux/lib/std/Encode/Guess.pm +355 -0
  85. data/Slic3r/Linux/lib/std/Encode/JP.pm +95 -0
  86. data/Slic3r/Linux/lib/std/Encode/JP/H2Z.pm +176 -0
  87. data/Slic3r/Linux/lib/std/Encode/JP/JIS7.pm +165 -0
  88. data/Slic3r/Linux/lib/std/Encode/KR.pm +69 -0
  89. data/Slic3r/Linux/lib/std/Encode/KR/2022_KR.pm +81 -0
  90. data/Slic3r/Linux/lib/std/Encode/Locale.pm +348 -0
  91. data/Slic3r/Linux/lib/std/Encode/MIME/Header.pm +242 -0
  92. data/Slic3r/Linux/lib/std/Encode/MIME/Header/ISO_2022_JP.pm +131 -0
  93. data/Slic3r/Linux/lib/std/Encode/MIME/Name.pm +94 -0
  94. data/Slic3r/Linux/lib/std/Encode/Symbol.pm +44 -0
  95. data/Slic3r/Linux/lib/std/Encode/TW.pm +75 -0
  96. data/Slic3r/Linux/lib/std/Encode/Unicode.pm +270 -0
  97. data/Slic3r/Linux/lib/std/Encode/Unicode/UTF7.pm +130 -0
  98. data/Slic3r/Linux/lib/std/Errno.pm +282 -0
  99. data/Slic3r/Linux/lib/std/Fcntl.pm +186 -0
  100. data/Slic3r/Linux/lib/std/File/Basename.pm +402 -0
  101. data/Slic3r/Linux/lib/std/File/Glob.pm +437 -0
  102. data/Slic3r/Linux/lib/std/File/GlobMapper.pm +679 -0
  103. data/Slic3r/Linux/lib/std/File/Listing.pm +435 -0
  104. data/Slic3r/Linux/lib/std/File/Path.pm +981 -0
  105. data/Slic3r/Linux/lib/std/File/Spec.pm +339 -0
  106. data/Slic3r/Linux/lib/std/File/Spec/Cygwin.pm +160 -0
  107. data/Slic3r/Linux/lib/std/File/Spec/Epoc.pm +79 -0
  108. data/Slic3r/Linux/lib/std/File/Spec/Functions.pm +130 -0
  109. data/Slic3r/Linux/lib/std/File/Spec/Mac.pm +786 -0
  110. data/Slic3r/Linux/lib/std/File/Spec/OS2.pm +276 -0
  111. data/Slic3r/Linux/lib/std/File/Spec/Unix.pm +595 -0
  112. data/Slic3r/Linux/lib/std/File/Spec/VMS.pm +679 -0
  113. data/Slic3r/Linux/lib/std/File/Spec/Win32.pm +446 -0
  114. data/Slic3r/Linux/lib/std/File/Temp.pm +2452 -0
  115. data/Slic3r/Linux/lib/std/File/stat.pm +345 -0
  116. data/Slic3r/Linux/lib/std/FileHandle.pm +262 -0
  117. data/Slic3r/Linux/lib/std/Filter/Util/Call.pm +498 -0
  118. data/Slic3r/Linux/lib/std/FindBin.pm +209 -0
  119. data/Slic3r/Linux/lib/std/Getopt/Long.pm +2693 -0
  120. data/Slic3r/Linux/lib/std/Growl/GNTP.pm +595 -0
  121. data/Slic3r/Linux/lib/std/HTML/Entities.pm +483 -0
  122. data/Slic3r/Linux/lib/std/HTML/HeadParser.pm +310 -0
  123. data/Slic3r/Linux/lib/std/HTML/Parser.pm +1240 -0
  124. data/Slic3r/Linux/lib/std/HTTP/Config.pm +436 -0
  125. data/Slic3r/Linux/lib/std/HTTP/Cookies.pm +781 -0
  126. data/Slic3r/Linux/lib/std/HTTP/Cookies/Netscape.pm +114 -0
  127. data/Slic3r/Linux/lib/std/HTTP/Date.pm +388 -0
  128. data/Slic3r/Linux/lib/std/HTTP/Headers.pm +849 -0
  129. data/Slic3r/Linux/lib/std/HTTP/Headers/Util.pm +199 -0
  130. data/Slic3r/Linux/lib/std/HTTP/Message.pm +1107 -0
  131. data/Slic3r/Linux/lib/std/HTTP/Negotiate.pm +528 -0
  132. data/Slic3r/Linux/lib/std/HTTP/Request.pm +242 -0
  133. data/Slic3r/Linux/lib/std/HTTP/Request/Common.pm +514 -0
  134. data/Slic3r/Linux/lib/std/HTTP/Response.pm +638 -0
  135. data/Slic3r/Linux/lib/std/HTTP/Status.pm +267 -0
  136. data/Slic3r/Linux/lib/std/I18N/Langinfo.pm +191 -0
  137. data/Slic3r/Linux/lib/std/IO.pm +68 -0
  138. data/Slic3r/Linux/lib/std/IO/Compress/Adapter/Bzip2.pm +162 -0
  139. data/Slic3r/Linux/lib/std/IO/Compress/Adapter/Deflate.pm +165 -0
  140. data/Slic3r/Linux/lib/std/IO/Compress/Base.pm +981 -0
  141. data/Slic3r/Linux/lib/std/IO/Compress/Base/Common.pm +956 -0
  142. data/Slic3r/Linux/lib/std/IO/Compress/Bzip2.pm +758 -0
  143. data/Slic3r/Linux/lib/std/IO/Compress/Deflate.pm +930 -0
  144. data/Slic3r/Linux/lib/std/IO/Compress/Gzip.pm +1242 -0
  145. data/Slic3r/Linux/lib/std/IO/Compress/Gzip/Constants.pm +148 -0
  146. data/Slic3r/Linux/lib/std/IO/Compress/RawDeflate.pm +1017 -0
  147. data/Slic3r/Linux/lib/std/IO/Compress/Zlib/Constants.pm +77 -0
  148. data/Slic3r/Linux/lib/std/IO/Compress/Zlib/Extra.pm +198 -0
  149. data/Slic3r/Linux/lib/std/IO/Dir.pm +248 -0
  150. data/Slic3r/Linux/lib/std/IO/File.pm +204 -0
  151. data/Slic3r/Linux/lib/std/IO/Handle.pm +646 -0
  152. data/Slic3r/Linux/lib/std/IO/Pipe.pm +257 -0
  153. data/Slic3r/Linux/lib/std/IO/Seekable.pm +128 -0
  154. data/Slic3r/Linux/lib/std/IO/Select.pm +387 -0
  155. data/Slic3r/Linux/lib/std/IO/Socket.pm +540 -0
  156. data/Slic3r/Linux/lib/std/IO/Socket/INET.pm +464 -0
  157. data/Slic3r/Linux/lib/std/IO/Socket/SSL.pm +2456 -0
  158. data/Slic3r/Linux/lib/std/IO/Socket/UNIX.pm +143 -0
  159. data/Slic3r/Linux/lib/std/IO/Uncompress/Adapter/Bunzip2.pm +112 -0
  160. data/Slic3r/Linux/lib/std/IO/Uncompress/Adapter/Inflate.pm +158 -0
  161. data/Slic3r/Linux/lib/std/IO/Uncompress/Base.pm +1483 -0
  162. data/Slic3r/Linux/lib/std/IO/Uncompress/Bunzip2.pm +858 -0
  163. data/Slic3r/Linux/lib/std/IO/Uncompress/Gunzip.pm +1111 -0
  164. data/Slic3r/Linux/lib/std/IO/Uncompress/Inflate.pm +982 -0
  165. data/Slic3r/Linux/lib/std/IO/Uncompress/RawInflate.pm +1110 -0
  166. data/Slic3r/Linux/lib/std/Import/Into.pm +289 -0
  167. data/Slic3r/Linux/lib/std/LWP.pm +667 -0
  168. data/Slic3r/Linux/lib/std/LWP/Authen/Basic.pm +65 -0
  169. data/Slic3r/Linux/lib/std/LWP/Authen/Digest.pm +68 -0
  170. data/Slic3r/Linux/lib/std/LWP/Authen/Ntlm.pm +180 -0
  171. data/Slic3r/Linux/lib/std/LWP/ConnCache.pm +313 -0
  172. data/Slic3r/Linux/lib/std/LWP/MediaTypes.pm +280 -0
  173. data/Slic3r/Linux/lib/std/LWP/MemberMixin.pm +44 -0
  174. data/Slic3r/Linux/lib/std/LWP/Protocol.pm +291 -0
  175. data/Slic3r/Linux/lib/std/LWP/Protocol/GHTTP.pm +73 -0
  176. data/Slic3r/Linux/lib/std/LWP/Protocol/cpan.pm +72 -0
  177. data/Slic3r/Linux/lib/std/LWP/Protocol/data.pm +52 -0
  178. data/Slic3r/Linux/lib/std/LWP/Protocol/file.pm +146 -0
  179. data/Slic3r/Linux/lib/std/LWP/Protocol/ftp.pm +543 -0
  180. data/Slic3r/Linux/lib/std/LWP/Protocol/gopher.pm +213 -0
  181. data/Slic3r/Linux/lib/std/LWP/Protocol/http.pm +501 -0
  182. data/Slic3r/Linux/lib/std/LWP/Protocol/https.pm +132 -0
  183. data/Slic3r/Linux/lib/std/LWP/Protocol/loopback.pm +26 -0
  184. data/Slic3r/Linux/lib/std/LWP/Protocol/mailto.pm +183 -0
  185. data/Slic3r/Linux/lib/std/LWP/Protocol/nntp.pm +145 -0
  186. data/Slic3r/Linux/lib/std/LWP/Protocol/nogo.pm +24 -0
  187. data/Slic3r/Linux/lib/std/LWP/UserAgent.pm +1859 -0
  188. data/Slic3r/Linux/lib/std/List/Util.pm +433 -0
  189. data/Slic3r/Linux/lib/std/MIME/Base64.pm +188 -0
  190. data/Slic3r/Linux/lib/std/MIME/QuotedPrint.pm +114 -0
  191. data/Slic3r/Linux/lib/std/Mail/Address.pm +273 -0
  192. data/Slic3r/Linux/lib/std/Mail/Header.pm +637 -0
  193. data/Slic3r/Linux/lib/std/Mail/Internet.pm +546 -0
  194. data/Slic3r/Linux/lib/std/Mail/Mailer.pm +215 -0
  195. data/Slic3r/Linux/lib/std/Mail/Util.pm +149 -0
  196. data/Slic3r/Linux/lib/std/Math/BigFloat.pm +4493 -0
  197. data/Slic3r/Linux/lib/std/Math/BigFloat/Trace.pm +58 -0
  198. data/Slic3r/Linux/lib/std/Math/BigInt.pm +5284 -0
  199. data/Slic3r/Linux/lib/std/Math/BigInt/Calc.pm +2970 -0
  200. data/Slic3r/Linux/lib/std/Math/BigInt/CalcEmu.pm +329 -0
  201. data/Slic3r/Linux/lib/std/Math/BigInt/FastCalc.pm +112 -0
  202. data/Slic3r/Linux/lib/std/Math/BigInt/Trace.pm +47 -0
  203. data/Slic3r/Linux/lib/std/Math/Complex.pm +2093 -0
  204. data/Slic3r/Linux/lib/std/Math/Libm.pm +199 -0
  205. data/Slic3r/Linux/lib/std/Math/PlanePath.pm +2211 -0
  206. data/Slic3r/Linux/lib/std/Math/PlanePath/ArchimedeanChords.pm +686 -0
  207. data/Slic3r/Linux/lib/std/Math/PlanePath/Base/Digits.pm +389 -0
  208. data/Slic3r/Linux/lib/std/Math/PlanePath/Base/Generic.pm +242 -0
  209. data/Slic3r/Linux/lib/std/Math/PlanePath/Base/NSEW.pm +114 -0
  210. data/Slic3r/Linux/lib/std/Math/PlanePath/Flowsnake.pm +886 -0
  211. data/Slic3r/Linux/lib/std/Math/PlanePath/FlowsnakeCentres.pm +1018 -0
  212. data/Slic3r/Linux/lib/std/Math/PlanePath/HilbertCurve.pm +772 -0
  213. data/Slic3r/Linux/lib/std/Math/PlanePath/MultipleRings.pm +1715 -0
  214. data/Slic3r/Linux/lib/std/Math/PlanePath/OctagramSpiral.pm +469 -0
  215. data/Slic3r/Linux/lib/std/Math/PlanePath/SacksSpiral.pm +440 -0
  216. data/Slic3r/Linux/lib/std/Math/Trig.pm +768 -0
  217. data/Slic3r/Linux/lib/std/Method/Generate/Accessor.pm +652 -0
  218. data/Slic3r/Linux/lib/std/Method/Generate/BuildAll.pm +33 -0
  219. data/Slic3r/Linux/lib/std/Method/Generate/Constructor.pm +221 -0
  220. data/Slic3r/Linux/lib/std/Method/Generate/DemolishAll.pm +48 -0
  221. data/Slic3r/Linux/lib/std/Module/Runtime.pm +494 -0
  222. data/Slic3r/Linux/lib/std/Moo.pm +989 -0
  223. data/Slic3r/Linux/lib/std/Moo/HandleMoose.pm +210 -0
  224. data/Slic3r/Linux/lib/std/Moo/HandleMoose/FakeMetaClass.pm +21 -0
  225. data/Slic3r/Linux/lib/std/Moo/HandleMoose/_TypeMap.pm +72 -0
  226. data/Slic3r/Linux/lib/std/Moo/Object.pm +80 -0
  227. data/Slic3r/Linux/lib/std/Moo/Role.pm +475 -0
  228. data/Slic3r/Linux/lib/std/Moo/_Utils.pm +124 -0
  229. data/Slic3r/Linux/lib/std/Moo/_mro.pm +10 -0
  230. data/Slic3r/Linux/lib/std/Moo/sification.pm +22 -0
  231. data/Slic3r/Linux/lib/std/Mozilla/CA.pm +99 -0
  232. data/Slic3r/Linux/lib/std/Mozilla/CA/cacert.pem +3366 -0
  233. data/Slic3r/Linux/lib/std/Net/Cmd.pm +783 -0
  234. data/Slic3r/Linux/lib/std/Net/Config.pm +312 -0
  235. data/Slic3r/Linux/lib/std/Net/Domain.pm +347 -0
  236. data/Slic3r/Linux/lib/std/Net/FTP.pm +1829 -0
  237. data/Slic3r/Linux/lib/std/Net/FTP/A.pm +111 -0
  238. data/Slic3r/Linux/lib/std/Net/FTP/E.pm +8 -0
  239. data/Slic3r/Linux/lib/std/Net/FTP/I.pm +80 -0
  240. data/Slic3r/Linux/lib/std/Net/FTP/L.pm +8 -0
  241. data/Slic3r/Linux/lib/std/Net/FTP/dataconn.pm +124 -0
  242. data/Slic3r/Linux/lib/std/Net/HTTP.pm +279 -0
  243. data/Slic3r/Linux/lib/std/Net/HTTP/Methods.pm +593 -0
  244. data/Slic3r/Linux/lib/std/Net/HTTPS.pm +110 -0
  245. data/Slic3r/Linux/lib/std/Net/NNTP.pm +1140 -0
  246. data/Slic3r/Linux/lib/std/Net/Netrc.pm +325 -0
  247. data/Slic3r/Linux/lib/std/Net/SMTP.pm +867 -0
  248. data/Slic3r/Linux/lib/std/Net/SSL.pm +639 -0
  249. data/Slic3r/Linux/lib/std/Net/SSLeay.pm +2692 -0
  250. data/Slic3r/Linux/lib/std/OpenGL.pm +6288 -0
  251. data/Slic3r/Linux/lib/std/POSIX.pm +1037 -0
  252. data/Slic3r/Linux/lib/std/Params/Validate/XS.pm +51 -0
  253. data/Slic3r/Linux/lib/std/PerlIO.pm +332 -0
  254. data/Slic3r/Linux/lib/std/PerlIO/encoding.pm +53 -0
  255. data/Slic3r/Linux/lib/std/PerlIO/scalar.pm +41 -0
  256. data/Slic3r/Linux/lib/std/PerlIO/via.pm +243 -0
  257. data/Slic3r/Linux/lib/std/PerlIO/via/QuotedPrint.pm +94 -0
  258. data/Slic3r/Linux/lib/std/Pod/Escapes.pm +721 -0
  259. data/Slic3r/Linux/lib/std/Pod/InputObjects.pm +936 -0
  260. data/Slic3r/Linux/lib/std/Pod/Parser.pm +1829 -0
  261. data/Slic3r/Linux/lib/std/Pod/PlainText.pm +738 -0
  262. data/Slic3r/Linux/lib/std/Pod/Select.pm +746 -0
  263. data/Slic3r/Linux/lib/std/Pod/Simple.pm +1535 -0
  264. data/Slic3r/Linux/lib/std/Pod/Simple/BlackBox.pm +1930 -0
  265. data/Slic3r/Linux/lib/std/Pod/Simple/LinkSection.pm +174 -0
  266. data/Slic3r/Linux/lib/std/Pod/Simple/TiedOutFH.pm +105 -0
  267. data/Slic3r/Linux/lib/std/Pod/Simple/Transcode.pm +35 -0
  268. data/Slic3r/Linux/lib/std/Pod/Text.pm +886 -0
  269. data/Slic3r/Linux/lib/std/Pod/Usage.pm +730 -0
  270. data/Slic3r/Linux/lib/std/Role/Tiny.pm +698 -0
  271. data/Slic3r/Linux/lib/std/SVG.pm +341 -0
  272. data/Slic3r/Linux/lib/std/SVG/DOM.pm +804 -0
  273. data/Slic3r/Linux/lib/std/SVG/Element.pm +1649 -0
  274. data/Slic3r/Linux/lib/std/SVG/Extension.pm +458 -0
  275. data/Slic3r/Linux/lib/std/SVG/XML.pm +185 -0
  276. data/Slic3r/Linux/lib/std/Scalar/Util.pm +325 -0
  277. data/Slic3r/Linux/lib/std/SelectSaver.pm +54 -0
  278. data/Slic3r/Linux/lib/std/Slic3r.pm +180 -0
  279. data/Slic3r/Linux/lib/std/Slic3r/Build.pm +8 -0
  280. data/Slic3r/Linux/lib/std/Slic3r/Config.pm +456 -0
  281. data/Slic3r/Linux/lib/std/Slic3r/ExPolygon.pm +53 -0
  282. data/Slic3r/Linux/lib/std/Slic3r/Extruder.pm +52 -0
  283. data/Slic3r/Linux/lib/std/Slic3r/ExtrusionLoop.pm +12 -0
  284. data/Slic3r/Linux/lib/std/Slic3r/ExtrusionPath.pm +12 -0
  285. data/Slic3r/Linux/lib/std/Slic3r/ExtrusionPath/Collection.pm +5 -0
  286. data/Slic3r/Linux/lib/std/Slic3r/Fill.pm +259 -0
  287. data/Slic3r/Linux/lib/std/Slic3r/Fill/ArchimedeanChords.pm +7 -0
  288. data/Slic3r/Linux/lib/std/Slic3r/Fill/Base.pm +81 -0
  289. data/Slic3r/Linux/lib/std/Slic3r/Fill/Concentric.pm +65 -0
  290. data/Slic3r/Linux/lib/std/Slic3r/Fill/Flowsnake.pm +18 -0
  291. data/Slic3r/Linux/lib/std/Slic3r/Fill/HilbertCurve.pm +7 -0
  292. data/Slic3r/Linux/lib/std/Slic3r/Fill/Honeycomb.pm +128 -0
  293. data/Slic3r/Linux/lib/std/Slic3r/Fill/Line.pm +8 -0
  294. data/Slic3r/Linux/lib/std/Slic3r/Fill/OctagramSpiral.pm +9 -0
  295. data/Slic3r/Linux/lib/std/Slic3r/Fill/PlanePath.pm +61 -0
  296. data/Slic3r/Linux/lib/std/Slic3r/Fill/Rectilinear.pm +110 -0
  297. data/Slic3r/Linux/lib/std/Slic3r/Flow.pm +12 -0
  298. data/Slic3r/Linux/lib/std/Slic3r/Format/AMF.pm +122 -0
  299. data/Slic3r/Linux/lib/std/Slic3r/Format/AMF/Parser.pm +157 -0
  300. data/Slic3r/Linux/lib/std/Slic3r/Format/OBJ.pm +36 -0
  301. data/Slic3r/Linux/lib/std/Slic3r/Format/STL.pm +39 -0
  302. data/Slic3r/Linux/lib/std/Slic3r/GCode.pm +696 -0
  303. data/Slic3r/Linux/lib/std/Slic3r/GCode/ArcFitting.pm +242 -0
  304. data/Slic3r/Linux/lib/std/Slic3r/GCode/CoolingBuffer.pm +80 -0
  305. data/Slic3r/Linux/lib/std/Slic3r/GCode/Layer.pm +238 -0
  306. data/Slic3r/Linux/lib/std/Slic3r/GCode/MotionPlanner.pm +317 -0
  307. data/Slic3r/Linux/lib/std/Slic3r/GCode/PlaceholderParser.pm +83 -0
  308. data/Slic3r/Linux/lib/std/Slic3r/GCode/Reader.pm +72 -0
  309. data/Slic3r/Linux/lib/std/Slic3r/GCode/SpiralVase.pm +81 -0
  310. data/Slic3r/Linux/lib/std/Slic3r/GCode/VibrationLimit.pm +64 -0
  311. data/Slic3r/Linux/lib/std/Slic3r/GUI.pm +586 -0
  312. data/Slic3r/Linux/lib/std/Slic3r/GUI/AboutDialog.pm +110 -0
  313. data/Slic3r/Linux/lib/std/Slic3r/GUI/ConfigWizard.pm +373 -0
  314. data/Slic3r/Linux/lib/std/Slic3r/GUI/OptionsGroup.pm +504 -0
  315. data/Slic3r/Linux/lib/std/Slic3r/GUI/Plater.pm +1437 -0
  316. data/Slic3r/Linux/lib/std/Slic3r/GUI/Plater/ObjectCutDialog.pm +153 -0
  317. data/Slic3r/Linux/lib/std/Slic3r/GUI/Plater/ObjectPartsPanel.pm +268 -0
  318. data/Slic3r/Linux/lib/std/Slic3r/GUI/Plater/ObjectPreviewDialog.pm +30 -0
  319. data/Slic3r/Linux/lib/std/Slic3r/GUI/Plater/ObjectSettingsDialog.pm +175 -0
  320. data/Slic3r/Linux/lib/std/Slic3r/GUI/Plater/OverrideSettingsPanel.pm +137 -0
  321. data/Slic3r/Linux/lib/std/Slic3r/GUI/Preferences.pm +78 -0
  322. data/Slic3r/Linux/lib/std/Slic3r/GUI/PreviewCanvas.pm +506 -0
  323. data/Slic3r/Linux/lib/std/Slic3r/GUI/SimpleTab.pm +230 -0
  324. data/Slic3r/Linux/lib/std/Slic3r/GUI/SkeinPanel.pm +550 -0
  325. data/Slic3r/Linux/lib/std/Slic3r/GUI/Tab.pm +944 -0
  326. data/Slic3r/Linux/lib/std/Slic3r/Geometry.pm +753 -0
  327. data/Slic3r/Linux/lib/std/Slic3r/Geometry/Clipper.pm +13 -0
  328. data/Slic3r/Linux/lib/std/Slic3r/Layer.pm +76 -0
  329. data/Slic3r/Linux/lib/std/Slic3r/Layer/BridgeDetector.pm +277 -0
  330. data/Slic3r/Linux/lib/std/Slic3r/Layer/Region.pm +545 -0
  331. data/Slic3r/Linux/lib/std/Slic3r/Line.pm +21 -0
  332. data/Slic3r/Linux/lib/std/Slic3r/Model.pm +608 -0
  333. data/Slic3r/Linux/lib/std/Slic3r/Point.pm +10 -0
  334. data/Slic3r/Linux/lib/std/Slic3r/Polygon.pm +95 -0
  335. data/Slic3r/Linux/lib/std/Slic3r/Polyline.pm +40 -0
  336. data/Slic3r/Linux/lib/std/Slic3r/Print.pm +1146 -0
  337. data/Slic3r/Linux/lib/std/Slic3r/Print/Object.pm +1023 -0
  338. data/Slic3r/Linux/lib/std/Slic3r/Print/Region.pm +63 -0
  339. data/Slic3r/Linux/lib/std/Slic3r/Print/Simple.pm +108 -0
  340. data/Slic3r/Linux/lib/std/Slic3r/Print/State.pm +28 -0
  341. data/Slic3r/Linux/lib/std/Slic3r/Print/SupportMaterial.pm +862 -0
  342. data/Slic3r/Linux/lib/std/Slic3r/SVG.pm +142 -0
  343. data/Slic3r/Linux/lib/std/Slic3r/Surface.pm +15 -0
  344. data/Slic3r/Linux/lib/std/Slic3r/Test/SectionCut.pm +170 -0
  345. data/Slic3r/Linux/lib/std/Slic3r/TriangleMesh.pm +22 -0
  346. data/Slic3r/Linux/lib/std/Slic3r/XS.pm +205 -0
  347. data/Slic3r/Linux/lib/std/Socket.pm +804 -0
  348. data/Slic3r/Linux/lib/std/Storable.pm +1227 -0
  349. data/Slic3r/Linux/lib/std/Sub/Defer.pm +141 -0
  350. data/Slic3r/Linux/lib/std/Sub/Exporter/Progressive.pm +158 -0
  351. data/Slic3r/Linux/lib/std/Sub/Quote.pm +368 -0
  352. data/Slic3r/Linux/lib/std/Symbol.pm +170 -0
  353. data/Slic3r/Linux/lib/std/Term/Cap.pm +799 -0
  354. data/Slic3r/Linux/lib/std/Text/ParseWords.pm +294 -0
  355. data/Slic3r/Linux/lib/std/Thread/Queue.pm +476 -0
  356. data/Slic3r/Linux/lib/std/Tie/Handle.pm +201 -0
  357. data/Slic3r/Linux/lib/std/Tie/Hash.pm +268 -0
  358. data/Slic3r/Linux/lib/std/Tie/Hash/NamedCapture.pm +49 -0
  359. data/Slic3r/Linux/lib/std/Tie/StdHandle.pm +71 -0
  360. data/Slic3r/Linux/lib/std/Time/HiRes.pm +591 -0
  361. data/Slic3r/Linux/lib/std/Time/Local.pm +384 -0
  362. data/Slic3r/Linux/lib/std/Time/Zone.pm +291 -0
  363. data/Slic3r/Linux/lib/std/UNIVERSAL.pm +214 -0
  364. data/Slic3r/Linux/lib/std/URI.pm +1131 -0
  365. data/Slic3r/Linux/lib/std/URI/Escape.pm +208 -0
  366. data/Slic3r/Linux/lib/std/URI/Heuristic.pm +253 -0
  367. data/Slic3r/Linux/lib/std/URI/IRI.pm +44 -0
  368. data/Slic3r/Linux/lib/std/URI/QueryParam.pm +193 -0
  369. data/Slic3r/Linux/lib/std/URI/Split.pm +96 -0
  370. data/Slic3r/Linux/lib/std/URI/URL.pm +305 -0
  371. data/Slic3r/Linux/lib/std/URI/WithBase.pm +171 -0
  372. data/Slic3r/Linux/lib/std/URI/_foreign.pm +6 -0
  373. data/Slic3r/Linux/lib/std/URI/_generic.pm +252 -0
  374. data/Slic3r/Linux/lib/std/URI/_idna.pm +87 -0
  375. data/Slic3r/Linux/lib/std/URI/_ldap.pm +140 -0
  376. data/Slic3r/Linux/lib/std/URI/_login.pm +10 -0
  377. data/Slic3r/Linux/lib/std/URI/_punycode.pm +202 -0
  378. data/Slic3r/Linux/lib/std/URI/_query.pm +93 -0
  379. data/Slic3r/Linux/lib/std/URI/_segment.pm +20 -0
  380. data/Slic3r/Linux/lib/std/URI/_server.pm +162 -0
  381. data/Slic3r/Linux/lib/std/URI/_userpass.pm +51 -0
  382. data/Slic3r/Linux/lib/std/URI/data.pm +140 -0
  383. data/Slic3r/Linux/lib/std/URI/file.pm +328 -0
  384. data/Slic3r/Linux/lib/std/URI/file/Base.pm +80 -0
  385. data/Slic3r/Linux/lib/std/URI/file/FAT.pm +23 -0
  386. data/Slic3r/Linux/lib/std/URI/file/Mac.pm +120 -0
  387. data/Slic3r/Linux/lib/std/URI/file/OS2.pm +28 -0
  388. data/Slic3r/Linux/lib/std/URI/file/QNX.pm +18 -0
  389. data/Slic3r/Linux/lib/std/URI/file/Unix.pm +55 -0
  390. data/Slic3r/Linux/lib/std/URI/file/Win32.pm +84 -0
  391. data/Slic3r/Linux/lib/std/URI/ftp.pm +45 -0
  392. data/Slic3r/Linux/lib/std/URI/gopher.pm +94 -0
  393. data/Slic3r/Linux/lib/std/URI/http.pm +25 -0
  394. data/Slic3r/Linux/lib/std/URI/https.pm +9 -0
  395. data/Slic3r/Linux/lib/std/URI/ldap.pm +122 -0
  396. data/Slic3r/Linux/lib/std/URI/ldapi.pm +30 -0
  397. data/Slic3r/Linux/lib/std/URI/ldaps.pm +9 -0
  398. data/Slic3r/Linux/lib/std/URI/mailto.pm +72 -0
  399. data/Slic3r/Linux/lib/std/URI/mms.pm +8 -0
  400. data/Slic3r/Linux/lib/std/URI/news.pm +68 -0
  401. data/Slic3r/Linux/lib/std/URI/nntp.pm +6 -0
  402. data/Slic3r/Linux/lib/std/URI/pop.pm +68 -0
  403. data/Slic3r/Linux/lib/std/URI/rlogin.pm +7 -0
  404. data/Slic3r/Linux/lib/std/URI/rsync.pm +12 -0
  405. data/Slic3r/Linux/lib/std/URI/rtsp.pm +8 -0
  406. data/Slic3r/Linux/lib/std/URI/rtspu.pm +8 -0
  407. data/Slic3r/Linux/lib/std/URI/sip.pm +86 -0
  408. data/Slic3r/Linux/lib/std/URI/sips.pm +9 -0
  409. data/Slic3r/Linux/lib/std/URI/snews.pm +10 -0
  410. data/Slic3r/Linux/lib/std/URI/ssh.pm +11 -0
  411. data/Slic3r/Linux/lib/std/URI/telnet.pm +7 -0
  412. data/Slic3r/Linux/lib/std/URI/tn3270.pm +7 -0
  413. data/Slic3r/Linux/lib/std/URI/urn.pm +97 -0
  414. data/Slic3r/Linux/lib/std/URI/urn/isbn.pm +102 -0
  415. data/Slic3r/Linux/lib/std/URI/urn/oid.pm +18 -0
  416. data/Slic3r/Linux/lib/std/Wx.pm +394 -0
  417. data/Slic3r/Linux/lib/std/Wx/App.pm +54 -0
  418. data/Slic3r/Linux/lib/std/Wx/DND.pm +74 -0
  419. data/Slic3r/Linux/lib/std/Wx/DropSource.pm +33 -0
  420. data/Slic3r/Linux/lib/std/Wx/Event.pm +469 -0
  421. data/Slic3r/Linux/lib/std/Wx/GLCanvas.pm +84 -0
  422. data/Slic3r/Linux/lib/std/Wx/Grid.pm +128 -0
  423. data/Slic3r/Linux/lib/std/Wx/Html.pm +67 -0
  424. data/Slic3r/Linux/lib/std/Wx/Locale.pm +61 -0
  425. data/Slic3r/Linux/lib/std/Wx/Menu.pm +74 -0
  426. data/Slic3r/Linux/lib/std/Wx/Mini.pm +181 -0
  427. data/Slic3r/Linux/lib/std/Wx/Print.pm +56 -0
  428. data/Slic3r/Linux/lib/std/Wx/RadioBox.pm +53 -0
  429. data/Slic3r/Linux/lib/std/Wx/Timer.pm +56 -0
  430. data/Slic3r/Linux/lib/std/Wx/Wx_Exp.pm +9494 -0
  431. data/Slic3r/Linux/lib/std/XML/NamespaceSupport.pm +583 -0
  432. data/Slic3r/Linux/lib/std/XML/SAX.pm +379 -0
  433. data/Slic3r/Linux/lib/std/XML/SAX/Base.pm +3176 -0
  434. data/Slic3r/Linux/lib/std/XML/SAX/BuildSAXBase.pl +847 -0
  435. data/Slic3r/Linux/lib/std/XML/SAX/DocumentLocator.pm +134 -0
  436. data/Slic3r/Linux/lib/std/XML/SAX/Exception.pm +129 -0
  437. data/Slic3r/Linux/lib/std/XML/SAX/ExpatXS.pm +354 -0
  438. data/Slic3r/Linux/lib/std/XML/SAX/ExpatXS/Encoding.pm +184 -0
  439. data/Slic3r/Linux/lib/std/XML/SAX/ExpatXS/Preload.pm +288 -0
  440. data/Slic3r/Linux/lib/std/XML/SAX/ParserDetails.ini +16 -0
  441. data/Slic3r/Linux/lib/std/XML/SAX/ParserFactory.pm +230 -0
  442. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl.pm +751 -0
  443. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/DTDDecls.pm +603 -0
  444. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/DebugHandler.pm +95 -0
  445. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/DocType.pm +180 -0
  446. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/EncodingDetect.pm +105 -0
  447. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/Exception.pm +67 -0
  448. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/NoUnicodeExt.pm +28 -0
  449. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/Productions.pm +147 -0
  450. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/Reader.pm +136 -0
  451. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/Reader/NoUnicodeExt.pm +25 -0
  452. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/Reader/Stream.pm +84 -0
  453. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/Reader/String.pm +78 -0
  454. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/Reader/URI.pm +57 -0
  455. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/Reader/UnicodeExt.pm +23 -0
  456. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/UnicodeExt.pm +22 -0
  457. data/Slic3r/Linux/lib/std/XML/SAX/PurePerl/XMLDecl.pm +129 -0
  458. data/Slic3r/Linux/lib/std/attributes.pm +490 -0
  459. data/Slic3r/Linux/lib/std/auto/B/B.so +0 -0
  460. data/Slic3r/Linux/lib/std/auto/Class/XSAccessor/XSAccessor.so +0 -0
  461. data/Slic3r/Linux/lib/std/auto/Compress/Raw/Bzip2/Bzip2.so +0 -0
  462. data/Slic3r/Linux/lib/std/auto/Compress/Raw/Bzip2/autosplit.ix +3 -0
  463. data/Slic3r/Linux/lib/std/auto/Compress/Raw/Zlib/Zlib.so +0 -0
  464. data/Slic3r/Linux/lib/std/auto/Compress/Raw/Zlib/autosplit.ix +3 -0
  465. data/Slic3r/Linux/lib/std/auto/Crypt/SSLeay/SSLeay.so +0 -0
  466. data/Slic3r/Linux/lib/std/auto/Cwd/Cwd.so +0 -0
  467. data/Slic3r/Linux/lib/std/auto/Data/Dumper/Dumper.so +0 -0
  468. data/Slic3r/Linux/lib/std/auto/Data/UUID/UUID.so +0 -0
  469. data/Slic3r/Linux/lib/std/auto/Digest/MD5/MD5.so +0 -0
  470. data/Slic3r/Linux/lib/std/auto/Digest/SHA/SHA.so +0 -0
  471. data/Slic3r/Linux/lib/std/auto/Encode/Byte/Byte.so +0 -0
  472. data/Slic3r/Linux/lib/std/auto/Encode/CN/CN.so +0 -0
  473. data/Slic3r/Linux/lib/std/auto/Encode/EBCDIC/EBCDIC.so +0 -0
  474. data/Slic3r/Linux/lib/std/auto/Encode/Encode.so +0 -0
  475. data/Slic3r/Linux/lib/std/auto/Encode/JP/JP.so +0 -0
  476. data/Slic3r/Linux/lib/std/auto/Encode/KR/KR.so +0 -0
  477. data/Slic3r/Linux/lib/std/auto/Encode/Symbol/Symbol.so +0 -0
  478. data/Slic3r/Linux/lib/std/auto/Encode/TW/TW.so +0 -0
  479. data/Slic3r/Linux/lib/std/auto/Encode/Unicode/Unicode.so +0 -0
  480. data/Slic3r/Linux/lib/std/auto/Fcntl/Fcntl.so +0 -0
  481. data/Slic3r/Linux/lib/std/auto/File/Glob/Glob.so +0 -0
  482. data/Slic3r/Linux/lib/std/auto/Filter/Util/Call/Call.so +0 -0
  483. data/Slic3r/Linux/lib/std/auto/HTML/Parser/Parser.so +0 -0
  484. data/Slic3r/Linux/lib/std/auto/I18N/Langinfo/Langinfo.so +0 -0
  485. data/Slic3r/Linux/lib/std/auto/IO/IO.so +0 -0
  486. data/Slic3r/Linux/lib/std/auto/List/Util/Util.so +0 -0
  487. data/Slic3r/Linux/lib/std/auto/MIME/Base64/Base64.so +0 -0
  488. data/Slic3r/Linux/lib/std/auto/Math/BigInt/FastCalc/FastCalc.so +0 -0
  489. data/Slic3r/Linux/lib/std/auto/Math/Libm/Libm.so +0 -0
  490. data/Slic3r/Linux/lib/std/auto/Math/Libm/autosplit.ix +3 -0
  491. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/SSLeay.so +0 -0
  492. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/autosplit.ix +78 -0
  493. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/debug_read.al +22 -0
  494. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/do_https.al +18 -0
  495. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/do_https2.al +13 -0
  496. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/do_https3.al +13 -0
  497. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/do_https4.al +12 -0
  498. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/do_httpx2.al +18 -0
  499. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/do_httpx3.al +43 -0
  500. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/do_httpx4.al +19 -0
  501. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/dump_peer_certificate.al +29 -0
  502. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/get_http.al +9 -0
  503. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/get_http3.al +9 -0
  504. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/get_http4.al +9 -0
  505. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/get_https.al +9 -0
  506. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/get_https3.al +9 -0
  507. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/get_https4.al +9 -0
  508. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/get_httpx.al +9 -0
  509. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/get_httpx3.al +9 -0
  510. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/get_httpx4.al +9 -0
  511. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/head_http.al +10 -0
  512. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/head_http3.al +10 -0
  513. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/head_http4.al +12 -0
  514. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/head_https.al +10 -0
  515. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/head_https3.al +10 -0
  516. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/head_https4.al +12 -0
  517. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/head_httpx.al +10 -0
  518. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/head_httpx3.al +10 -0
  519. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/head_httpx4.al +13 -0
  520. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/http_cat.al +34 -0
  521. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/https_cat.al +97 -0
  522. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/httpx_cat.al +18 -0
  523. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/make_form.al +25 -0
  524. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/make_headers.al +21 -0
  525. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/new_x_ctx.al +16 -0
  526. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/open_proxy_tcp_connection.al +31 -0
  527. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/open_tcp_connection.al +40 -0
  528. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/post_http.al +9 -0
  529. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/post_http3.al +9 -0
  530. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/post_http4.al +9 -0
  531. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/post_https.al +9 -0
  532. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/post_https3.al +9 -0
  533. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/post_https4.al +9 -0
  534. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/post_httpx.al +9 -0
  535. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/post_httpx3.al +9 -0
  536. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/post_httpx4.al +9 -0
  537. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/put_http.al +9 -0
  538. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/put_http3.al +9 -0
  539. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/put_http4.al +9 -0
  540. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/put_https.al +9 -0
  541. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/put_https3.al +9 -0
  542. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/put_https4.al +9 -0
  543. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/put_httpx.al +9 -0
  544. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/put_httpx3.al +9 -0
  545. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/put_httpx4.al +9 -0
  546. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/randomize.al +31 -0
  547. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/set_cert_and_key.al +23 -0
  548. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/set_proxy.al +16 -0
  549. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/set_server_cert_and_key.al +14 -0
  550. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/ssl_read_CRLF.al +10 -0
  551. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/ssl_read_all.al +28 -0
  552. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/ssl_read_until.al +95 -0
  553. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/ssl_write_CRLF.al +23 -0
  554. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/ssl_write_all.al +149 -0
  555. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/sslcat.al +99 -0
  556. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/tcp_read_CRLF.al +11 -0
  557. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/tcp_read_all.al +26 -0
  558. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/tcp_read_until.al +34 -0
  559. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/tcp_write_CRLF.al +23 -0
  560. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/tcp_write_all.al +36 -0
  561. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/tcpcat.al +37 -0
  562. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/tcpxcat.al +17 -0
  563. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/want_X509_lookup.al +15 -0
  564. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/want_nothing.al +16 -0
  565. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/want_read.al +9 -0
  566. data/Slic3r/Linux/lib/std/auto/Net/SSLeay/want_write.al +9 -0
  567. data/Slic3r/Linux/lib/std/auto/OpenGL/OpenGL.so +0 -0
  568. data/Slic3r/Linux/lib/std/auto/OpenGL/autosplit.ix +3 -0
  569. data/Slic3r/Linux/lib/std/auto/POSIX/POSIX.so +0 -0
  570. data/Slic3r/Linux/lib/std/auto/POSIX/SigAction/flags.al +9 -0
  571. data/Slic3r/Linux/lib/std/auto/POSIX/SigAction/handler.al +9 -0
  572. data/Slic3r/Linux/lib/std/auto/POSIX/SigAction/mask.al +9 -0
  573. data/Slic3r/Linux/lib/std/auto/POSIX/SigAction/new.al +11 -0
  574. data/Slic3r/Linux/lib/std/auto/POSIX/SigAction/safe.al +13 -0
  575. data/Slic3r/Linux/lib/std/auto/POSIX/SigRt/CLEAR.al +9 -0
  576. data/Slic3r/Linux/lib/std/auto/POSIX/SigRt/DELETE.al +9 -0
  577. data/Slic3r/Linux/lib/std/auto/POSIX/SigRt/EXISTS.al +9 -0
  578. data/Slic3r/Linux/lib/std/auto/POSIX/SigRt/FETCH.al +12 -0
  579. data/Slic3r/Linux/lib/std/auto/POSIX/SigRt/SCALAR.al +9 -0
  580. data/Slic3r/Linux/lib/std/auto/POSIX/SigRt/STORE.al +9 -0
  581. data/Slic3r/Linux/lib/std/auto/POSIX/SigRt/_check.al +15 -0
  582. data/Slic3r/Linux/lib/std/auto/POSIX/SigRt/_croak.al +13 -0
  583. data/Slic3r/Linux/lib/std/auto/POSIX/SigRt/_exist.al +14 -0
  584. data/Slic3r/Linux/lib/std/auto/POSIX/SigRt/_getsig.al +17 -0
  585. data/Slic3r/Linux/lib/std/auto/POSIX/SigRt/_init.al +14 -0
  586. data/Slic3r/Linux/lib/std/auto/POSIX/SigRt/new.al +17 -0
  587. data/Slic3r/Linux/lib/std/auto/POSIX/abs.al +13 -0
  588. data/Slic3r/Linux/lib/std/auto/POSIX/alarm.al +13 -0
  589. data/Slic3r/Linux/lib/std/auto/POSIX/assert.al +15 -0
  590. data/Slic3r/Linux/lib/std/auto/POSIX/atan2.al +13 -0
  591. data/Slic3r/Linux/lib/std/auto/POSIX/atexit.al +12 -0
  592. data/Slic3r/Linux/lib/std/auto/POSIX/atof.al +12 -0
  593. data/Slic3r/Linux/lib/std/auto/POSIX/atoi.al +12 -0
  594. data/Slic3r/Linux/lib/std/auto/POSIX/atol.al +12 -0
  595. data/Slic3r/Linux/lib/std/auto/POSIX/autosplit.ix +173 -0
  596. data/Slic3r/Linux/lib/std/auto/POSIX/bsearch.al +12 -0
  597. data/Slic3r/Linux/lib/std/auto/POSIX/calloc.al +12 -0
  598. data/Slic3r/Linux/lib/std/auto/POSIX/chdir.al +13 -0
  599. data/Slic3r/Linux/lib/std/auto/POSIX/chmod.al +13 -0
  600. data/Slic3r/Linux/lib/std/auto/POSIX/chown.al +13 -0
  601. data/Slic3r/Linux/lib/std/auto/POSIX/clearerr.al +12 -0
  602. data/Slic3r/Linux/lib/std/auto/POSIX/closedir.al +13 -0
  603. data/Slic3r/Linux/lib/std/auto/POSIX/cos.al +13 -0
  604. data/Slic3r/Linux/lib/std/auto/POSIX/creat.al +13 -0
  605. data/Slic3r/Linux/lib/std/auto/POSIX/div.al +12 -0
  606. data/Slic3r/Linux/lib/std/auto/POSIX/errno.al +13 -0
  607. data/Slic3r/Linux/lib/std/auto/POSIX/execl.al +12 -0
  608. data/Slic3r/Linux/lib/std/auto/POSIX/execle.al +12 -0
  609. data/Slic3r/Linux/lib/std/auto/POSIX/execlp.al +12 -0
  610. data/Slic3r/Linux/lib/std/auto/POSIX/execv.al +12 -0
  611. data/Slic3r/Linux/lib/std/auto/POSIX/execve.al +12 -0
  612. data/Slic3r/Linux/lib/std/auto/POSIX/execvp.al +12 -0
  613. data/Slic3r/Linux/lib/std/auto/POSIX/exit.al +13 -0
  614. data/Slic3r/Linux/lib/std/auto/POSIX/exp.al +13 -0
  615. data/Slic3r/Linux/lib/std/auto/POSIX/fabs.al +13 -0
  616. data/Slic3r/Linux/lib/std/auto/POSIX/fclose.al +12 -0
  617. data/Slic3r/Linux/lib/std/auto/POSIX/fcntl.al +13 -0
  618. data/Slic3r/Linux/lib/std/auto/POSIX/fdopen.al +12 -0
  619. data/Slic3r/Linux/lib/std/auto/POSIX/feof.al +12 -0
  620. data/Slic3r/Linux/lib/std/auto/POSIX/ferror.al +12 -0
  621. data/Slic3r/Linux/lib/std/auto/POSIX/fflush.al +12 -0
  622. data/Slic3r/Linux/lib/std/auto/POSIX/fgetc.al +12 -0
  623. data/Slic3r/Linux/lib/std/auto/POSIX/fgetpos.al +12 -0
  624. data/Slic3r/Linux/lib/std/auto/POSIX/fgets.al +12 -0
  625. data/Slic3r/Linux/lib/std/auto/POSIX/fileno.al +12 -0
  626. data/Slic3r/Linux/lib/std/auto/POSIX/fopen.al +12 -0
  627. data/Slic3r/Linux/lib/std/auto/POSIX/fork.al +13 -0
  628. data/Slic3r/Linux/lib/std/auto/POSIX/fprintf.al +12 -0
  629. data/Slic3r/Linux/lib/std/auto/POSIX/fputc.al +12 -0
  630. data/Slic3r/Linux/lib/std/auto/POSIX/fputs.al +12 -0
  631. data/Slic3r/Linux/lib/std/auto/POSIX/fread.al +12 -0
  632. data/Slic3r/Linux/lib/std/auto/POSIX/free.al +12 -0
  633. data/Slic3r/Linux/lib/std/auto/POSIX/freopen.al +12 -0
  634. data/Slic3r/Linux/lib/std/auto/POSIX/fscanf.al +12 -0
  635. data/Slic3r/Linux/lib/std/auto/POSIX/fseek.al +12 -0
  636. data/Slic3r/Linux/lib/std/auto/POSIX/fsetpos.al +12 -0
  637. data/Slic3r/Linux/lib/std/auto/POSIX/fstat.al +17 -0
  638. data/Slic3r/Linux/lib/std/auto/POSIX/fsync.al +12 -0
  639. data/Slic3r/Linux/lib/std/auto/POSIX/ftell.al +12 -0
  640. data/Slic3r/Linux/lib/std/auto/POSIX/fwrite.al +12 -0
  641. data/Slic3r/Linux/lib/std/auto/POSIX/getc.al +13 -0
  642. data/Slic3r/Linux/lib/std/auto/POSIX/getchar.al +13 -0
  643. data/Slic3r/Linux/lib/std/auto/POSIX/getegid.al +13 -0
  644. data/Slic3r/Linux/lib/std/auto/POSIX/getenv.al +13 -0
  645. data/Slic3r/Linux/lib/std/auto/POSIX/geteuid.al +13 -0
  646. data/Slic3r/Linux/lib/std/auto/POSIX/getgid.al +13 -0
  647. data/Slic3r/Linux/lib/std/auto/POSIX/getgrgid.al +13 -0
  648. data/Slic3r/Linux/lib/std/auto/POSIX/getgrnam.al +13 -0
  649. data/Slic3r/Linux/lib/std/auto/POSIX/getgroups.al +14 -0
  650. data/Slic3r/Linux/lib/std/auto/POSIX/getlogin.al +13 -0
  651. data/Slic3r/Linux/lib/std/auto/POSIX/getpgrp.al +13 -0
  652. data/Slic3r/Linux/lib/std/auto/POSIX/getpid.al +13 -0
  653. data/Slic3r/Linux/lib/std/auto/POSIX/getppid.al +13 -0
  654. data/Slic3r/Linux/lib/std/auto/POSIX/getpwnam.al +13 -0
  655. data/Slic3r/Linux/lib/std/auto/POSIX/getpwuid.al +13 -0
  656. data/Slic3r/Linux/lib/std/auto/POSIX/gets.al +13 -0
  657. data/Slic3r/Linux/lib/std/auto/POSIX/getuid.al +13 -0
  658. data/Slic3r/Linux/lib/std/auto/POSIX/gmtime.al +13 -0
  659. data/Slic3r/Linux/lib/std/auto/POSIX/isatty.al +13 -0
  660. data/Slic3r/Linux/lib/std/auto/POSIX/kill.al +13 -0
  661. data/Slic3r/Linux/lib/std/auto/POSIX/labs.al +12 -0
  662. data/Slic3r/Linux/lib/std/auto/POSIX/ldiv.al +12 -0
  663. data/Slic3r/Linux/lib/std/auto/POSIX/link.al +13 -0
  664. data/Slic3r/Linux/lib/std/auto/POSIX/load_imports.al +231 -0
  665. data/Slic3r/Linux/lib/std/auto/POSIX/localtime.al +13 -0
  666. data/Slic3r/Linux/lib/std/auto/POSIX/log.al +13 -0
  667. data/Slic3r/Linux/lib/std/auto/POSIX/longjmp.al +12 -0
  668. data/Slic3r/Linux/lib/std/auto/POSIX/malloc.al +12 -0
  669. data/Slic3r/Linux/lib/std/auto/POSIX/memchr.al +12 -0
  670. data/Slic3r/Linux/lib/std/auto/POSIX/memcmp.al +12 -0
  671. data/Slic3r/Linux/lib/std/auto/POSIX/memcpy.al +12 -0
  672. data/Slic3r/Linux/lib/std/auto/POSIX/memmove.al +12 -0
  673. data/Slic3r/Linux/lib/std/auto/POSIX/memset.al +12 -0
  674. data/Slic3r/Linux/lib/std/auto/POSIX/mkdir.al +13 -0
  675. data/Slic3r/Linux/lib/std/auto/POSIX/offsetof.al +12 -0
  676. data/Slic3r/Linux/lib/std/auto/POSIX/opendir.al +16 -0
  677. data/Slic3r/Linux/lib/std/auto/POSIX/perror.al +13 -0
  678. data/Slic3r/Linux/lib/std/auto/POSIX/pow.al +13 -0
  679. data/Slic3r/Linux/lib/std/auto/POSIX/printf.al +13 -0
  680. data/Slic3r/Linux/lib/std/auto/POSIX/putc.al +12 -0
  681. data/Slic3r/Linux/lib/std/auto/POSIX/putchar.al +12 -0
  682. data/Slic3r/Linux/lib/std/auto/POSIX/puts.al +12 -0
  683. data/Slic3r/Linux/lib/std/auto/POSIX/qsort.al +12 -0
  684. data/Slic3r/Linux/lib/std/auto/POSIX/raise.al +13 -0
  685. data/Slic3r/Linux/lib/std/auto/POSIX/rand.al +12 -0
  686. data/Slic3r/Linux/lib/std/auto/POSIX/readdir.al +13 -0
  687. data/Slic3r/Linux/lib/std/auto/POSIX/realloc.al +12 -0
  688. data/Slic3r/Linux/lib/std/auto/POSIX/redef.al +13 -0
  689. data/Slic3r/Linux/lib/std/auto/POSIX/remove.al +13 -0
  690. data/Slic3r/Linux/lib/std/auto/POSIX/rename.al +13 -0
  691. data/Slic3r/Linux/lib/std/auto/POSIX/rewind.al +13 -0
  692. data/Slic3r/Linux/lib/std/auto/POSIX/rewinddir.al +13 -0
  693. data/Slic3r/Linux/lib/std/auto/POSIX/rmdir.al +13 -0
  694. data/Slic3r/Linux/lib/std/auto/POSIX/scanf.al +12 -0
  695. data/Slic3r/Linux/lib/std/auto/POSIX/setbuf.al +12 -0
  696. data/Slic3r/Linux/lib/std/auto/POSIX/setjmp.al +12 -0
  697. data/Slic3r/Linux/lib/std/auto/POSIX/setvbuf.al +12 -0
  698. data/Slic3r/Linux/lib/std/auto/POSIX/siglongjmp.al +12 -0
  699. data/Slic3r/Linux/lib/std/auto/POSIX/sigsetjmp.al +12 -0
  700. data/Slic3r/Linux/lib/std/auto/POSIX/sin.al +13 -0
  701. data/Slic3r/Linux/lib/std/auto/POSIX/sleep.al +13 -0
  702. data/Slic3r/Linux/lib/std/auto/POSIX/sprintf.al +13 -0
  703. data/Slic3r/Linux/lib/std/auto/POSIX/sqrt.al +13 -0
  704. data/Slic3r/Linux/lib/std/auto/POSIX/srand.al +12 -0
  705. data/Slic3r/Linux/lib/std/auto/POSIX/sscanf.al +12 -0
  706. data/Slic3r/Linux/lib/std/auto/POSIX/stat.al +13 -0
  707. data/Slic3r/Linux/lib/std/auto/POSIX/strcat.al +12 -0
  708. data/Slic3r/Linux/lib/std/auto/POSIX/strchr.al +12 -0
  709. data/Slic3r/Linux/lib/std/auto/POSIX/strcmp.al +12 -0
  710. data/Slic3r/Linux/lib/std/auto/POSIX/strcpy.al +12 -0
  711. data/Slic3r/Linux/lib/std/auto/POSIX/strcspn.al +12 -0
  712. data/Slic3r/Linux/lib/std/auto/POSIX/strerror.al +14 -0
  713. data/Slic3r/Linux/lib/std/auto/POSIX/strlen.al +12 -0
  714. data/Slic3r/Linux/lib/std/auto/POSIX/strncat.al +12 -0
  715. data/Slic3r/Linux/lib/std/auto/POSIX/strncmp.al +12 -0
  716. data/Slic3r/Linux/lib/std/auto/POSIX/strncpy.al +12 -0
  717. data/Slic3r/Linux/lib/std/auto/POSIX/strpbrk.al +12 -0
  718. data/Slic3r/Linux/lib/std/auto/POSIX/strrchr.al +12 -0
  719. data/Slic3r/Linux/lib/std/auto/POSIX/strspn.al +12 -0
  720. data/Slic3r/Linux/lib/std/auto/POSIX/strstr.al +13 -0
  721. data/Slic3r/Linux/lib/std/auto/POSIX/strtok.al +12 -0
  722. data/Slic3r/Linux/lib/std/auto/POSIX/system.al +13 -0
  723. data/Slic3r/Linux/lib/std/auto/POSIX/time.al +13 -0
  724. data/Slic3r/Linux/lib/std/auto/POSIX/tmpfile.al +12 -0
  725. data/Slic3r/Linux/lib/std/auto/POSIX/tolower.al +13 -0
  726. data/Slic3r/Linux/lib/std/auto/POSIX/toupper.al +13 -0
  727. data/Slic3r/Linux/lib/std/auto/POSIX/umask.al +13 -0
  728. data/Slic3r/Linux/lib/std/auto/POSIX/ungetc.al +12 -0
  729. data/Slic3r/Linux/lib/std/auto/POSIX/unimpl.al +14 -0
  730. data/Slic3r/Linux/lib/std/auto/POSIX/unlink.al +13 -0
  731. data/Slic3r/Linux/lib/std/auto/POSIX/usage.al +13 -0
  732. data/Slic3r/Linux/lib/std/auto/POSIX/utime.al +13 -0
  733. data/Slic3r/Linux/lib/std/auto/POSIX/vfprintf.al +12 -0
  734. data/Slic3r/Linux/lib/std/auto/POSIX/vprintf.al +12 -0
  735. data/Slic3r/Linux/lib/std/auto/POSIX/vsprintf.al +12 -0
  736. data/Slic3r/Linux/lib/std/auto/POSIX/wait.al +13 -0
  737. data/Slic3r/Linux/lib/std/auto/POSIX/waitpid.al +13 -0
  738. data/Slic3r/Linux/lib/std/auto/Params/Validate/XS/XS.so +0 -0
  739. data/Slic3r/Linux/lib/std/auto/PerlIO/encoding/encoding.so +0 -0
  740. data/Slic3r/Linux/lib/std/auto/PerlIO/scalar/scalar.so +0 -0
  741. data/Slic3r/Linux/lib/std/auto/PerlIO/via/via.so +0 -0
  742. data/Slic3r/Linux/lib/std/auto/Slic3r/XS/XS.so +0 -0
  743. data/Slic3r/Linux/lib/std/auto/Socket/Socket.so +0 -0
  744. data/Slic3r/Linux/lib/std/auto/Storable/Storable.so +0 -0
  745. data/Slic3r/Linux/lib/std/auto/Tie/Hash/NamedCapture/NamedCapture.so +0 -0
  746. data/Slic3r/Linux/lib/std/auto/Time/HiRes/HiRes.so +0 -0
  747. data/Slic3r/Linux/lib/std/auto/Wx/DND/DND.so +0 -0
  748. data/Slic3r/Linux/lib/std/auto/Wx/GLCanvas/GLCanvas.so +0 -0
  749. data/Slic3r/Linux/lib/std/auto/Wx/Grid/Grid.so +0 -0
  750. data/Slic3r/Linux/lib/std/auto/Wx/Html/Html.so +0 -0
  751. data/Slic3r/Linux/lib/std/auto/Wx/Print/Print.so +0 -0
  752. data/Slic3r/Linux/lib/std/auto/Wx/Wx.so +0 -0
  753. data/Slic3r/Linux/lib/std/auto/XML/SAX/ExpatXS/ExpatXS.so +0 -0
  754. data/Slic3r/Linux/lib/std/auto/attributes/attributes.so +0 -0
  755. data/Slic3r/Linux/lib/std/auto/mro/mro.so +0 -0
  756. data/Slic3r/Linux/lib/std/auto/re/re.so +0 -0
  757. data/Slic3r/Linux/lib/std/auto/threads/shared/shared.so +0 -0
  758. data/Slic3r/Linux/lib/std/auto/threads/threads.so +0 -0
  759. data/Slic3r/Linux/lib/std/base.pm +265 -0
  760. data/Slic3r/Linux/lib/std/bytes.pm +100 -0
  761. data/Slic3r/Linux/lib/std/bytes_heavy.pl +40 -0
  762. data/Slic3r/Linux/lib/std/constant.pm +397 -0
  763. data/Slic3r/Linux/lib/std/constant/defer.pm +441 -0
  764. data/Slic3r/Linux/lib/std/encoding.pm +669 -0
  765. data/Slic3r/Linux/lib/std/encoding/warnings.pm +239 -0
  766. data/Slic3r/Linux/lib/std/feature.pm +249 -0
  767. data/Slic3r/Linux/lib/std/filetest.pm +117 -0
  768. data/Slic3r/Linux/lib/std/integer.pm +93 -0
  769. data/Slic3r/Linux/lib/std/less.pm +158 -0
  770. data/Slic3r/Linux/lib/std/mro.pm +363 -0
  771. data/Slic3r/Linux/lib/std/overload.pm +1701 -0
  772. data/Slic3r/Linux/lib/std/parent.pm +136 -0
  773. data/Slic3r/Linux/lib/std/re.pm +604 -0
  774. data/Slic3r/Linux/lib/std/slic3r.pl +491 -0
  775. data/Slic3r/Linux/lib/std/sort.pm +196 -0
  776. data/Slic3r/Linux/lib/std/strictures.pm +296 -0
  777. data/Slic3r/Linux/lib/std/threads.pm +1115 -0
  778. data/Slic3r/Linux/lib/std/threads/shared.pm +616 -0
  779. data/Slic3r/Linux/lib/std/unicore/Heavy.pl +3261 -0
  780. data/Slic3r/Linux/lib/std/unicore/To/Age.pl +1036 -0
  781. data/Slic3r/Linux/lib/std/unicore/To/Bc.pl +555 -0
  782. data/Slic3r/Linux/lib/std/unicore/To/Bmg.pl +375 -0
  783. data/Slic3r/Linux/lib/std/unicore/To/Digit.pl +433 -0
  784. data/Slic3r/Linux/lib/std/unicore/To/Dt.pl +759 -0
  785. data/Slic3r/Linux/lib/std/unicore/To/Ea.pl +245 -0
  786. data/Slic3r/Linux/lib/std/unicore/To/Fold.pl +1177 -0
  787. data/Slic3r/Linux/lib/std/unicore/To/GCB.pl +1177 -0
  788. data/Slic3r/Linux/lib/std/unicore/To/Gc.pl +2639 -0
  789. data/Slic3r/Linux/lib/std/unicore/To/Hst.pl +822 -0
  790. data/Slic3r/Linux/lib/std/unicore/To/Jg.pl +144 -0
  791. data/Slic3r/Linux/lib/std/unicore/To/Jt.pl +292 -0
  792. data/Slic3r/Linux/lib/std/unicore/To/Lb.pl +2195 -0
  793. data/Slic3r/Linux/lib/std/unicore/To/Lower.pl +1061 -0
  794. data/Slic3r/Linux/lib/std/unicore/To/NFCQC.pl +126 -0
  795. data/Slic3r/Linux/lib/std/unicore/To/NFDQC.pl +245 -0
  796. data/Slic3r/Linux/lib/std/unicore/To/NFKCCF.pl +9815 -0
  797. data/Slic3r/Linux/lib/std/unicore/To/NFKCQC.pl +265 -0
  798. data/Slic3r/Linux/lib/std/unicore/To/NFKDQC.pl +367 -0
  799. data/Slic3r/Linux/lib/std/unicore/To/Na1.pl +1996 -0
  800. data/Slic3r/Linux/lib/std/unicore/To/Nt.pl +198 -0
  801. data/Slic3r/Linux/lib/std/unicore/To/Nv.pl +1157 -0
  802. data/Slic3r/Linux/lib/std/unicore/To/SB.pl +1958 -0
  803. data/Slic3r/Linux/lib/std/unicore/To/Sc.pl +702 -0
  804. data/Slic3r/Linux/lib/std/unicore/To/Title.pl +1117 -0
  805. data/Slic3r/Linux/lib/std/unicore/To/Upper.pl +1144 -0
  806. data/Slic3r/Linux/lib/std/unicore/To/WB.pl +691 -0
  807. data/Slic3r/Linux/lib/std/unicore/To/_slc.pl +46 -0
  808. data/Slic3r/Linux/lib/std/unicore/To/_stc.pl +45 -0
  809. data/Slic3r/Linux/lib/std/unicore/To/_suc.pl +45 -0
  810. data/Slic3r/Linux/lib/std/unicore/lib/AHex/N.pl +16 -0
  811. data/Slic3r/Linux/lib/std/unicore/lib/AHex/Y.pl +15 -0
  812. data/Slic3r/Linux/lib/std/unicore/lib/Age/1_1.pl +300 -0
  813. data/Slic3r/Linux/lib/std/unicore/lib/Age/2_0.pl +41 -0
  814. data/Slic3r/Linux/lib/std/unicore/lib/Age/2_1.pl +14 -0
  815. data/Slic3r/Linux/lib/std/unicore/lib/Age/3_0.pl +133 -0
  816. data/Slic3r/Linux/lib/std/unicore/lib/Age/3_1.pl +48 -0
  817. data/Slic3r/Linux/lib/std/unicore/lib/Age/3_2.pl +71 -0
  818. data/Slic3r/Linux/lib/std/unicore/lib/Age/4_0.pl +89 -0
  819. data/Slic3r/Linux/lib/std/unicore/lib/Age/4_1.pl +98 -0
  820. data/Slic3r/Linux/lib/std/unicore/lib/Age/5_0.pl +47 -0
  821. data/Slic3r/Linux/lib/std/unicore/lib/Age/5_1.pl +101 -0
  822. data/Slic3r/Linux/lib/std/unicore/lib/Age/5_2.pl +102 -0
  823. data/Slic3r/Linux/lib/std/unicore/lib/Age/6_0.pl +118 -0
  824. data/Slic3r/Linux/lib/std/unicore/lib/Age/Unassign.pl +522 -0
  825. data/Slic3r/Linux/lib/std/unicore/lib/Alpha/N.pl +499 -0
  826. data/Slic3r/Linux/lib/std/unicore/lib/Alpha/Y.pl +498 -0
  827. data/Slic3r/Linux/lib/std/unicore/lib/Bc/AL.pl +30 -0
  828. data/Slic3r/Linux/lib/std/unicore/lib/Bc/AN.pl +17 -0
  829. data/Slic3r/Linux/lib/std/unicore/lib/Bc/B.pl +17 -0
  830. data/Slic3r/Linux/lib/std/unicore/lib/Bc/BN.pl +41 -0
  831. data/Slic3r/Linux/lib/std/unicore/lib/Bc/CS.pl +25 -0
  832. data/Slic3r/Linux/lib/std/unicore/lib/Bc/EN.pl +23 -0
  833. data/Slic3r/Linux/lib/std/unicore/lib/Bc/ES.pl +21 -0
  834. data/Slic3r/Linux/lib/std/unicore/lib/Bc/ET.pl +33 -0
  835. data/Slic3r/Linux/lib/std/unicore/lib/Bc/L.pl +358 -0
  836. data/Slic3r/Linux/lib/std/unicore/lib/Bc/LRE.pl +13 -0
  837. data/Slic3r/Linux/lib/std/unicore/lib/Bc/LRO.pl +13 -0
  838. data/Slic3r/Linux/lib/std/unicore/lib/Bc/NSM.pl +211 -0
  839. data/Slic3r/Linux/lib/std/unicore/lib/Bc/ON.pl +195 -0
  840. data/Slic3r/Linux/lib/std/unicore/lib/Bc/PDF.pl +13 -0
  841. data/Slic3r/Linux/lib/std/unicore/lib/Bc/R.pl +40 -0
  842. data/Slic3r/Linux/lib/std/unicore/lib/Bc/RLE.pl +13 -0
  843. data/Slic3r/Linux/lib/std/unicore/lib/Bc/RLO.pl +13 -0
  844. data/Slic3r/Linux/lib/std/unicore/lib/Bc/S.pl +15 -0
  845. data/Slic3r/Linux/lib/std/unicore/lib/Bc/WS.pl +20 -0
  846. data/Slic3r/Linux/lib/std/unicore/lib/BidiC/N.pl +15 -0
  847. data/Slic3r/Linux/lib/std/unicore/lib/BidiC/Y.pl +14 -0
  848. data/Slic3r/Linux/lib/std/unicore/lib/BidiM/N.pl +124 -0
  849. data/Slic3r/Linux/lib/std/unicore/lib/BidiM/Y.pl +123 -0
  850. data/Slic3r/Linux/lib/std/unicore/lib/Blk/ASCII.pl +13 -0
  851. data/Slic3r/Linux/lib/std/unicore/lib/Blk/AegeanNu.pl +13 -0
  852. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Alchemic.pl +13 -0
  853. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Alphabet.pl +13 -0
  854. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Ancient2.pl +13 -0
  855. data/Slic3r/Linux/lib/std/unicore/lib/Blk/AncientG.pl +13 -0
  856. data/Slic3r/Linux/lib/std/unicore/lib/Blk/AncientS.pl +13 -0
  857. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Arabic.pl +13 -0
  858. data/Slic3r/Linux/lib/std/unicore/lib/Blk/ArabicP2.pl +13 -0
  859. data/Slic3r/Linux/lib/std/unicore/lib/Blk/ArabicPr.pl +13 -0
  860. data/Slic3r/Linux/lib/std/unicore/lib/Blk/ArabicSu.pl +13 -0
  861. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Armenian.pl +13 -0
  862. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Arrows.pl +13 -0
  863. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Avestan.pl +13 -0
  864. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Balinese.pl +13 -0
  865. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Bamum.pl +13 -0
  866. data/Slic3r/Linux/lib/std/unicore/lib/Blk/BamumSup.pl +13 -0
  867. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Batak.pl +13 -0
  868. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Bengali.pl +13 -0
  869. data/Slic3r/Linux/lib/std/unicore/lib/Blk/BlockEle.pl +13 -0
  870. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Bopomof2.pl +13 -0
  871. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Bopomofo.pl +13 -0
  872. data/Slic3r/Linux/lib/std/unicore/lib/Blk/BoxDrawi.pl +13 -0
  873. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Brahmi.pl +13 -0
  874. data/Slic3r/Linux/lib/std/unicore/lib/Blk/BrailleP.pl +13 -0
  875. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Buginese.pl +13 -0
  876. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Buhid.pl +13 -0
  877. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Byzantin.pl +13 -0
  878. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CJKComp2.pl +13 -0
  879. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CJKComp3.pl +13 -0
  880. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CJKComp4.pl +13 -0
  881. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CJKCompa.pl +13 -0
  882. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CJKRadic.pl +13 -0
  883. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CJKStrok.pl +13 -0
  884. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CJKSymbo.pl +13 -0
  885. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CJKUnif2.pl +13 -0
  886. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CJKUnif3.pl +13 -0
  887. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CJKUnif4.pl +13 -0
  888. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CJKUnif5.pl +13 -0
  889. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CJKUnifi.pl +13 -0
  890. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Canadian.pl +13 -0
  891. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Carian.pl +13 -0
  892. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Cham.pl +13 -0
  893. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Cherokee.pl +13 -0
  894. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Combini2.pl +13 -0
  895. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Combini3.pl +13 -0
  896. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Combini4.pl +13 -0
  897. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Combinin.pl +13 -0
  898. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CommonIn.pl +13 -0
  899. data/Slic3r/Linux/lib/std/unicore/lib/Blk/ControlP.pl +13 -0
  900. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Coptic.pl +13 -0
  901. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Counting.pl +13 -0
  902. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Cuneifo2.pl +13 -0
  903. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Cuneifor.pl +13 -0
  904. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Currency.pl +13 -0
  905. data/Slic3r/Linux/lib/std/unicore/lib/Blk/CypriotS.pl +13 -0
  906. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Cyrilli2.pl +13 -0
  907. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Cyrilli3.pl +13 -0
  908. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Cyrilli4.pl +13 -0
  909. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Cyrillic.pl +13 -0
  910. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Deseret.pl +13 -0
  911. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Devanag2.pl +13 -0
  912. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Devanaga.pl +13 -0
  913. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Dingbats.pl +13 -0
  914. data/Slic3r/Linux/lib/std/unicore/lib/Blk/DominoTi.pl +13 -0
  915. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Egyptian.pl +13 -0
  916. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Emoticon.pl +13 -0
  917. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Enclose2.pl +13 -0
  918. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Enclose3.pl +13 -0
  919. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Enclose4.pl +13 -0
  920. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Enclosed.pl +13 -0
  921. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Ethiopi2.pl +13 -0
  922. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Ethiopi3.pl +13 -0
  923. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Ethiopi4.pl +13 -0
  924. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Ethiopic.pl +13 -0
  925. data/Slic3r/Linux/lib/std/unicore/lib/Blk/GeneralP.pl +13 -0
  926. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Geometri.pl +13 -0
  927. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Georgia2.pl +13 -0
  928. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Georgian.pl +13 -0
  929. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Glagolit.pl +13 -0
  930. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Gothic.pl +13 -0
  931. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Greek.pl +13 -0
  932. data/Slic3r/Linux/lib/std/unicore/lib/Blk/GreekExt.pl +13 -0
  933. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Gujarati.pl +13 -0
  934. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Gurmukhi.pl +13 -0
  935. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Halfwidt.pl +13 -0
  936. data/Slic3r/Linux/lib/std/unicore/lib/Blk/HangulCo.pl +13 -0
  937. data/Slic3r/Linux/lib/std/unicore/lib/Blk/HangulJ2.pl +13 -0
  938. data/Slic3r/Linux/lib/std/unicore/lib/Blk/HangulJ3.pl +13 -0
  939. data/Slic3r/Linux/lib/std/unicore/lib/Blk/HangulJa.pl +13 -0
  940. data/Slic3r/Linux/lib/std/unicore/lib/Blk/HangulSy.pl +13 -0
  941. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Hanunoo.pl +13 -0
  942. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Hebrew.pl +13 -0
  943. data/Slic3r/Linux/lib/std/unicore/lib/Blk/HighPriv.pl +13 -0
  944. data/Slic3r/Linux/lib/std/unicore/lib/Blk/HighSurr.pl +13 -0
  945. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Hiragana.pl +13 -0
  946. data/Slic3r/Linux/lib/std/unicore/lib/Blk/IPAExten.pl +13 -0
  947. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Ideograp.pl +13 -0
  948. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Imperial.pl +13 -0
  949. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Inscrip2.pl +13 -0
  950. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Inscript.pl +13 -0
  951. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Javanese.pl +13 -0
  952. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Kaithi.pl +13 -0
  953. data/Slic3r/Linux/lib/std/unicore/lib/Blk/KanaSupp.pl +13 -0
  954. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Kanbun.pl +13 -0
  955. data/Slic3r/Linux/lib/std/unicore/lib/Blk/KangxiRa.pl +13 -0
  956. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Kannada.pl +13 -0
  957. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Katakan2.pl +13 -0
  958. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Katakana.pl +13 -0
  959. data/Slic3r/Linux/lib/std/unicore/lib/Blk/KayahLi.pl +13 -0
  960. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Kharosht.pl +13 -0
  961. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Khmer.pl +13 -0
  962. data/Slic3r/Linux/lib/std/unicore/lib/Blk/KhmerSym.pl +13 -0
  963. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Lao.pl +13 -0
  964. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Latin1.pl +13 -0
  965. data/Slic3r/Linux/lib/std/unicore/lib/Blk/LatinEx2.pl +13 -0
  966. data/Slic3r/Linux/lib/std/unicore/lib/Blk/LatinEx3.pl +13 -0
  967. data/Slic3r/Linux/lib/std/unicore/lib/Blk/LatinEx4.pl +13 -0
  968. data/Slic3r/Linux/lib/std/unicore/lib/Blk/LatinEx5.pl +13 -0
  969. data/Slic3r/Linux/lib/std/unicore/lib/Blk/LatinExt.pl +13 -0
  970. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Lepcha.pl +13 -0
  971. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Letterli.pl +13 -0
  972. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Limbu.pl +13 -0
  973. data/Slic3r/Linux/lib/std/unicore/lib/Blk/LinearBI.pl +13 -0
  974. data/Slic3r/Linux/lib/std/unicore/lib/Blk/LinearBS.pl +13 -0
  975. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Lisu.pl +13 -0
  976. data/Slic3r/Linux/lib/std/unicore/lib/Blk/LowSurro.pl +13 -0
  977. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Lycian.pl +13 -0
  978. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Lydian.pl +13 -0
  979. data/Slic3r/Linux/lib/std/unicore/lib/Blk/MahjongT.pl +13 -0
  980. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Malayala.pl +13 -0
  981. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Mandaic.pl +13 -0
  982. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Mathema2.pl +13 -0
  983. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Mathemat.pl +13 -0
  984. data/Slic3r/Linux/lib/std/unicore/lib/Blk/MeeteiMa.pl +13 -0
  985. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Miscell2.pl +13 -0
  986. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Miscell3.pl +13 -0
  987. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Miscell4.pl +13 -0
  988. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Miscell5.pl +13 -0
  989. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Miscell6.pl +13 -0
  990. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Miscella.pl +13 -0
  991. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Modifier.pl +13 -0
  992. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Mongolia.pl +13 -0
  993. data/Slic3r/Linux/lib/std/unicore/lib/Blk/MusicalS.pl +13 -0
  994. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Myanmar.pl +13 -0
  995. data/Slic3r/Linux/lib/std/unicore/lib/Blk/MyanmarE.pl +13 -0
  996. data/Slic3r/Linux/lib/std/unicore/lib/Blk/NKo.pl +13 -0
  997. data/Slic3r/Linux/lib/std/unicore/lib/Blk/NewTaiLu.pl +13 -0
  998. data/Slic3r/Linux/lib/std/unicore/lib/Blk/NoBlock.pl +45 -0
  999. data/Slic3r/Linux/lib/std/unicore/lib/Blk/NumberFo.pl +13 -0
  1000. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Ogham.pl +13 -0
  1001. data/Slic3r/Linux/lib/std/unicore/lib/Blk/OlChiki.pl +13 -0
  1002. data/Slic3r/Linux/lib/std/unicore/lib/Blk/OldItali.pl +13 -0
  1003. data/Slic3r/Linux/lib/std/unicore/lib/Blk/OldPersi.pl +13 -0
  1004. data/Slic3r/Linux/lib/std/unicore/lib/Blk/OldSouth.pl +13 -0
  1005. data/Slic3r/Linux/lib/std/unicore/lib/Blk/OldTurki.pl +13 -0
  1006. data/Slic3r/Linux/lib/std/unicore/lib/Blk/OpticalC.pl +13 -0
  1007. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Oriya.pl +13 -0
  1008. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Osmanya.pl +13 -0
  1009. data/Slic3r/Linux/lib/std/unicore/lib/Blk/PhagsPa.pl +13 -0
  1010. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Phaistos.pl +13 -0
  1011. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Phoenici.pl +13 -0
  1012. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Phoneti2.pl +13 -0
  1013. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Phonetic.pl +13 -0
  1014. data/Slic3r/Linux/lib/std/unicore/lib/Blk/PlayingC.pl +13 -0
  1015. data/Slic3r/Linux/lib/std/unicore/lib/Blk/PrivateU.pl +13 -0
  1016. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Rejang.pl +13 -0
  1017. data/Slic3r/Linux/lib/std/unicore/lib/Blk/RumiNume.pl +13 -0
  1018. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Runic.pl +13 -0
  1019. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Samarita.pl +13 -0
  1020. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Saurasht.pl +13 -0
  1021. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Shavian.pl +13 -0
  1022. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Sinhala.pl +13 -0
  1023. data/Slic3r/Linux/lib/std/unicore/lib/Blk/SmallFor.pl +13 -0
  1024. data/Slic3r/Linux/lib/std/unicore/lib/Blk/SpacingM.pl +13 -0
  1025. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Specials.pl +13 -0
  1026. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Sundanes.pl +13 -0
  1027. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Superscr.pl +13 -0
  1028. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Supplem2.pl +13 -0
  1029. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Supplem3.pl +13 -0
  1030. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Supplem4.pl +13 -0
  1031. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Supplem5.pl +13 -0
  1032. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Supplem6.pl +13 -0
  1033. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Suppleme.pl +13 -0
  1034. data/Slic3r/Linux/lib/std/unicore/lib/Blk/SylotiNa.pl +13 -0
  1035. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Syriac.pl +13 -0
  1036. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Tagalog.pl +13 -0
  1037. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Tagbanwa.pl +13 -0
  1038. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Tags.pl +13 -0
  1039. data/Slic3r/Linux/lib/std/unicore/lib/Blk/TaiLe.pl +13 -0
  1040. data/Slic3r/Linux/lib/std/unicore/lib/Blk/TaiTham.pl +13 -0
  1041. data/Slic3r/Linux/lib/std/unicore/lib/Blk/TaiViet.pl +13 -0
  1042. data/Slic3r/Linux/lib/std/unicore/lib/Blk/TaiXuanJ.pl +13 -0
  1043. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Tamil.pl +13 -0
  1044. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Telugu.pl +13 -0
  1045. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Thaana.pl +13 -0
  1046. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Thai.pl +13 -0
  1047. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Tibetan.pl +13 -0
  1048. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Tifinagh.pl +13 -0
  1049. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Transpor.pl +13 -0
  1050. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Ugaritic.pl +13 -0
  1051. data/Slic3r/Linux/lib/std/unicore/lib/Blk/UnifiedC.pl +13 -0
  1052. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Vai.pl +13 -0
  1053. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Variati2.pl +13 -0
  1054. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Variatio.pl +13 -0
  1055. data/Slic3r/Linux/lib/std/unicore/lib/Blk/VedicExt.pl +13 -0
  1056. data/Slic3r/Linux/lib/std/unicore/lib/Blk/Vertical.pl +13 -0
  1057. data/Slic3r/Linux/lib/std/unicore/lib/Blk/YiRadica.pl +13 -0
  1058. data/Slic3r/Linux/lib/std/unicore/lib/Blk/YiSyllab.pl +13 -0
  1059. data/Slic3r/Linux/lib/std/unicore/lib/Blk/YijingHe.pl +13 -0
  1060. data/Slic3r/Linux/lib/std/unicore/lib/CE/N.pl +46 -0
  1061. data/Slic3r/Linux/lib/std/unicore/lib/CE/Y.pl +45 -0
  1062. data/Slic3r/Linux/lib/std/unicore/lib/CI/N.pl +290 -0
  1063. data/Slic3r/Linux/lib/std/unicore/lib/CI/Y.pl +289 -0
  1064. data/Slic3r/Linux/lib/std/unicore/lib/CWCF/N.pl +590 -0
  1065. data/Slic3r/Linux/lib/std/unicore/lib/CWCF/Y.pl +589 -0
  1066. data/Slic3r/Linux/lib/std/unicore/lib/CWCM/N.pl +112 -0
  1067. data/Slic3r/Linux/lib/std/unicore/lib/CWCM/Y.pl +111 -0
  1068. data/Slic3r/Linux/lib/std/unicore/lib/CWKCF/N.pl +765 -0
  1069. data/Slic3r/Linux/lib/std/unicore/lib/CWKCF/Y.pl +764 -0
  1070. data/Slic3r/Linux/lib/std/unicore/lib/CWL/N.pl +579 -0
  1071. data/Slic3r/Linux/lib/std/unicore/lib/CWL/Y.pl +578 -0
  1072. data/Slic3r/Linux/lib/std/unicore/lib/CWT/N.pl +596 -0
  1073. data/Slic3r/Linux/lib/std/unicore/lib/CWT/Y.pl +595 -0
  1074. data/Slic3r/Linux/lib/std/unicore/lib/CWU/N.pl +595 -0
  1075. data/Slic3r/Linux/lib/std/unicore/lib/CWU/Y.pl +594 -0
  1076. data/Slic3r/Linux/lib/std/unicore/lib/Cased/N.pl +125 -0
  1077. data/Slic3r/Linux/lib/std/unicore/lib/Cased/Y.pl +124 -0
  1078. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/10.pl +13 -0
  1079. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/103.pl +13 -0
  1080. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/107.pl +13 -0
  1081. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/11.pl +13 -0
  1082. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/118.pl +13 -0
  1083. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/12.pl +13 -0
  1084. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/122.pl +13 -0
  1085. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/129.pl +13 -0
  1086. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/13.pl +13 -0
  1087. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/130.pl +15 -0
  1088. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/132.pl +13 -0
  1089. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/14.pl +13 -0
  1090. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/15.pl +13 -0
  1091. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/16.pl +13 -0
  1092. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/17.pl +13 -0
  1093. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/18.pl +14 -0
  1094. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/19.pl +13 -0
  1095. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/20.pl +13 -0
  1096. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/21.pl +13 -0
  1097. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/22.pl +13 -0
  1098. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/23.pl +13 -0
  1099. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/24.pl +13 -0
  1100. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/25.pl +13 -0
  1101. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/26.pl +13 -0
  1102. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/27.pl +13 -0
  1103. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/28.pl +13 -0
  1104. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/29.pl +13 -0
  1105. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/30.pl +14 -0
  1106. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/31.pl +14 -0
  1107. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/32.pl +14 -0
  1108. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/33.pl +13 -0
  1109. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/34.pl +13 -0
  1110. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/35.pl +13 -0
  1111. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/36.pl +13 -0
  1112. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/84.pl +13 -0
  1113. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/91.pl +13 -0
  1114. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/A.pl +96 -0
  1115. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/AL.pl +15 -0
  1116. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/AR.pl +16 -0
  1117. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/ATA.pl +13 -0
  1118. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/ATAR.pl +16 -0
  1119. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/ATB.pl +15 -0
  1120. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/ATBL.pl +13 -0
  1121. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/B.pl +71 -0
  1122. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/BL.pl +13 -0
  1123. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/BR.pl +16 -0
  1124. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/DA.pl +15 -0
  1125. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/DB.pl +16 -0
  1126. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/IS.pl +13 -0
  1127. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/KV.pl +13 -0
  1128. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/L.pl +13 -0
  1129. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/NK.pl +24 -0
  1130. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/NR.pl +135 -0
  1131. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/OV.pl +21 -0
  1132. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/R.pl +13 -0
  1133. data/Slic3r/Linux/lib/std/unicore/lib/Ccc/VR.pl +41 -0
  1134. data/Slic3r/Linux/lib/std/unicore/lib/CompEx/N.pl +87 -0
  1135. data/Slic3r/Linux/lib/std/unicore/lib/CompEx/Y.pl +86 -0
  1136. data/Slic3r/Linux/lib/std/unicore/lib/DI/N.pl +28 -0
  1137. data/Slic3r/Linux/lib/std/unicore/lib/DI/Y.pl +27 -0
  1138. data/Slic3r/Linux/lib/std/unicore/lib/Dash/N.pl +32 -0
  1139. data/Slic3r/Linux/lib/std/unicore/lib/Dash/Y.pl +31 -0
  1140. data/Slic3r/Linux/lib/std/unicore/lib/Dep/N.pl +22 -0
  1141. data/Slic3r/Linux/lib/std/unicore/lib/Dep/Y.pl +21 -0
  1142. data/Slic3r/Linux/lib/std/unicore/lib/Dia/N.pl +130 -0
  1143. data/Slic3r/Linux/lib/std/unicore/lib/Dia/Y.pl +129 -0
  1144. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Com.pl +86 -0
  1145. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Enc.pl +20 -0
  1146. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Fin.pl +125 -0
  1147. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Font.pl +46 -0
  1148. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Fra.pl +15 -0
  1149. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Init.pl +87 -0
  1150. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Iso.pl +110 -0
  1151. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Med.pl +66 -0
  1152. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Nar.pl +18 -0
  1153. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Nb.pl +17 -0
  1154. data/Slic3r/Linux/lib/std/unicore/lib/Dt/NonCanon.pl +161 -0
  1155. data/Slic3r/Linux/lib/std/unicore/lib/Dt/None.pl +362 -0
  1156. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Sml.pl +15 -0
  1157. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Sqr.pl +21 -0
  1158. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Sub.pl +16 -0
  1159. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Sup.pl +32 -0
  1160. data/Slic3r/Linux/lib/std/unicore/lib/Dt/Vert.pl +17 -0
  1161. data/Slic3r/Linux/lib/std/unicore/lib/Ea/A.pl +185 -0
  1162. data/Slic3r/Linux/lib/std/unicore/lib/Ea/F.pl +15 -0
  1163. data/Slic3r/Linux/lib/std/unicore/lib/Ea/H.pl +19 -0
  1164. data/Slic3r/Linux/lib/std/unicore/lib/Ea/N.pl +227 -0
  1165. data/Slic3r/Linux/lib/std/unicore/lib/Ea/Na.pl +19 -0
  1166. data/Slic3r/Linux/lib/std/unicore/lib/Ea/W.pl +49 -0
  1167. data/Slic3r/Linux/lib/std/unicore/lib/Ext/N.pl +33 -0
  1168. data/Slic3r/Linux/lib/std/unicore/lib/Ext/Y.pl +32 -0
  1169. data/Slic3r/Linux/lib/std/unicore/lib/GCB/CN.pl +32 -0
  1170. data/Slic3r/Linux/lib/std/unicore/lib/GCB/CR.pl +13 -0
  1171. data/Slic3r/Linux/lib/std/unicore/lib/GCB/EX.pl +227 -0
  1172. data/Slic3r/Linux/lib/std/unicore/lib/GCB/L.pl +14 -0
  1173. data/Slic3r/Linux/lib/std/unicore/lib/GCB/LF.pl +13 -0
  1174. data/Slic3r/Linux/lib/std/unicore/lib/GCB/LV.pl +411 -0
  1175. data/Slic3r/Linux/lib/std/unicore/lib/GCB/LVT.pl +411 -0
  1176. data/Slic3r/Linux/lib/std/unicore/lib/GCB/PP.pl +17 -0
  1177. data/Slic3r/Linux/lib/std/unicore/lib/GCB/SM.pl +125 -0
  1178. data/Slic3r/Linux/lib/std/unicore/lib/GCB/T.pl +14 -0
  1179. data/Slic3r/Linux/lib/std/unicore/lib/GCB/V.pl +14 -0
  1180. data/Slic3r/Linux/lib/std/unicore/lib/GCB/XX.pl +224 -0
  1181. data/Slic3r/Linux/lib/std/unicore/lib/Gc/C.pl +516 -0
  1182. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Cc.pl +14 -0
  1183. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Cf.pl +27 -0
  1184. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Cn.pl +513 -0
  1185. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Co.pl +15 -0
  1186. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Cs.pl +13 -0
  1187. data/Slic3r/Linux/lib/std/unicore/lib/Gc/L.pl +447 -0
  1188. data/Slic3r/Linux/lib/std/unicore/lib/Gc/LC.pl +122 -0
  1189. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Ll.pl +621 -0
  1190. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Lm.pl +61 -0
  1191. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Lo.pl +335 -0
  1192. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Lu.pl +615 -0
  1193. data/Slic3r/Linux/lib/std/unicore/lib/Gc/M.pl +205 -0
  1194. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Mc.pl +125 -0
  1195. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Me.pl +16 -0
  1196. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Mn.pl +215 -0
  1197. data/Slic3r/Linux/lib/std/unicore/lib/Gc/N.pl +95 -0
  1198. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Nl.pl +24 -0
  1199. data/Slic3r/Linux/lib/std/unicore/lib/Gc/No.pl +53 -0
  1200. data/Slic3r/Linux/lib/std/unicore/lib/Gc/P.pl +145 -0
  1201. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Pd.pl +27 -0
  1202. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Pe.pl +82 -0
  1203. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Pf.pl +22 -0
  1204. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Pi.pl +23 -0
  1205. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Po.pl +140 -0
  1206. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Ps.pl +84 -0
  1207. data/Slic3r/Linux/lib/std/unicore/lib/Gc/S.pl +220 -0
  1208. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Sc.pl +28 -0
  1209. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Sk.pl +39 -0
  1210. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Sm.pl +78 -0
  1211. data/Slic3r/Linux/lib/std/unicore/lib/Gc/So.pl +176 -0
  1212. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Z.pl +21 -0
  1213. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Zl.pl +13 -0
  1214. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Zp.pl +13 -0
  1215. data/Slic3r/Linux/lib/std/unicore/lib/Gc/Zs.pl +20 -0
  1216. data/Slic3r/Linux/lib/std/unicore/lib/GrBase/N.pl +609 -0
  1217. data/Slic3r/Linux/lib/std/unicore/lib/GrBase/Y.pl +608 -0
  1218. data/Slic3r/Linux/lib/std/unicore/lib/GrExt/N.pl +228 -0
  1219. data/Slic3r/Linux/lib/std/unicore/lib/Hex/N.pl +19 -0
  1220. data/Slic3r/Linux/lib/std/unicore/lib/Hex/Y.pl +18 -0
  1221. data/Slic3r/Linux/lib/std/unicore/lib/Hst/NA.pl +18 -0
  1222. data/Slic3r/Linux/lib/std/unicore/lib/Hyphen/N.pl +23 -0
  1223. data/Slic3r/Linux/lib/std/unicore/lib/Hyphen/Y.pl +22 -0
  1224. data/Slic3r/Linux/lib/std/unicore/lib/IDC/N.pl +527 -0
  1225. data/Slic3r/Linux/lib/std/unicore/lib/IDC/Y.pl +526 -0
  1226. data/Slic3r/Linux/lib/std/unicore/lib/IDS/N.pl +450 -0
  1227. data/Slic3r/Linux/lib/std/unicore/lib/IDS/Y.pl +449 -0
  1228. data/Slic3r/Linux/lib/std/unicore/lib/IDSB/N.pl +15 -0
  1229. data/Slic3r/Linux/lib/std/unicore/lib/IDSB/Y.pl +14 -0
  1230. data/Slic3r/Linux/lib/std/unicore/lib/IDST/N.pl +14 -0
  1231. data/Slic3r/Linux/lib/std/unicore/lib/IDST/Y.pl +13 -0
  1232. data/Slic3r/Linux/lib/std/unicore/lib/Ideo/N.pl +25 -0
  1233. data/Slic3r/Linux/lib/std/unicore/lib/Ideo/Y.pl +24 -0
  1234. data/Slic3r/Linux/lib/std/unicore/lib/In/2_0.pl +324 -0
  1235. data/Slic3r/Linux/lib/std/unicore/lib/In/2_1.pl +324 -0
  1236. data/Slic3r/Linux/lib/std/unicore/lib/In/3_0.pl +381 -0
  1237. data/Slic3r/Linux/lib/std/unicore/lib/In/3_1.pl +414 -0
  1238. data/Slic3r/Linux/lib/std/unicore/lib/In/3_2.pl +409 -0
  1239. data/Slic3r/Linux/lib/std/unicore/lib/In/4_0.pl +424 -0
  1240. data/Slic3r/Linux/lib/std/unicore/lib/In/4_1.pl +442 -0
  1241. data/Slic3r/Linux/lib/std/unicore/lib/In/5_0.pl +452 -0
  1242. data/Slic3r/Linux/lib/std/unicore/lib/In/5_1.pl +467 -0
  1243. data/Slic3r/Linux/lib/std/unicore/lib/In/5_2.pl +507 -0
  1244. data/Slic3r/Linux/lib/std/unicore/lib/In/6_0.pl +523 -0
  1245. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Ain.pl +16 -0
  1246. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Alaph.pl +13 -0
  1247. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Alef.pl +18 -0
  1248. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Beh.pl +17 -0
  1249. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Beth.pl +14 -0
  1250. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Burushas.pl +13 -0
  1251. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Dal.pl +16 -0
  1252. data/Slic3r/Linux/lib/std/unicore/lib/Jg/DalathRi.pl +15 -0
  1253. data/Slic3r/Linux/lib/std/unicore/lib/Jg/E.pl +13 -0
  1254. data/Slic3r/Linux/lib/std/unicore/lib/Jg/FarsiYeh.pl +16 -0
  1255. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Fe.pl +13 -0
  1256. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Feh.pl +15 -0
  1257. data/Slic3r/Linux/lib/std/unicore/lib/Jg/FinalSem.pl +13 -0
  1258. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Gaf.pl +17 -0
  1259. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Gamal.pl +14 -0
  1260. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Hah.pl +19 -0
  1261. data/Slic3r/Linux/lib/std/unicore/lib/Jg/He.pl +13 -0
  1262. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Heh.pl +13 -0
  1263. data/Slic3r/Linux/lib/std/unicore/lib/Jg/HehGoal.pl +13 -0
  1264. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Heth.pl +13 -0
  1265. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Kaf.pl +15 -0
  1266. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Kaph.pl +13 -0
  1267. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Khaph.pl +13 -0
  1268. data/Slic3r/Linux/lib/std/unicore/lib/Jg/KnottedH.pl +14 -0
  1269. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Lam.pl +15 -0
  1270. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Lamadh.pl +13 -0
  1271. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Meem.pl +14 -0
  1272. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Mim.pl +13 -0
  1273. data/Slic3r/Linux/lib/std/unicore/lib/Jg/NoJoinin.pl +26 -0
  1274. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Noon.pl +15 -0
  1275. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Nun.pl +13 -0
  1276. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Nya.pl +13 -0
  1277. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Pe.pl +13 -0
  1278. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Qaf.pl +15 -0
  1279. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Qaph.pl +13 -0
  1280. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Reh.pl +18 -0
  1281. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Reversed.pl +13 -0
  1282. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Sad.pl +15 -0
  1283. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Sadhe.pl +13 -0
  1284. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Seen.pl +19 -0
  1285. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Semkath.pl +13 -0
  1286. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Shin.pl +13 -0
  1287. data/Slic3r/Linux/lib/std/unicore/lib/Jg/SwashKaf.pl +13 -0
  1288. data/Slic3r/Linux/lib/std/unicore/lib/Jg/SyriacWa.pl +13 -0
  1289. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Tah.pl +14 -0
  1290. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Taw.pl +13 -0
  1291. data/Slic3r/Linux/lib/std/unicore/lib/Jg/TehMarb2.pl +13 -0
  1292. data/Slic3r/Linux/lib/std/unicore/lib/Jg/TehMarbu.pl +15 -0
  1293. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Teth.pl +13 -0
  1294. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Waw.pl +18 -0
  1295. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Yeh.pl +18 -0
  1296. data/Slic3r/Linux/lib/std/unicore/lib/Jg/YehBarre.pl +13 -0
  1297. data/Slic3r/Linux/lib/std/unicore/lib/Jg/YehWithT.pl +13 -0
  1298. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Yudh.pl +13 -0
  1299. data/Slic3r/Linux/lib/std/unicore/lib/Jg/YudhHe.pl +13 -0
  1300. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Zain.pl +13 -0
  1301. data/Slic3r/Linux/lib/std/unicore/lib/Jg/Zhain.pl +13 -0
  1302. data/Slic3r/Linux/lib/std/unicore/lib/JoinC/N.pl +14 -0
  1303. data/Slic3r/Linux/lib/std/unicore/lib/JoinC/Y.pl +13 -0
  1304. data/Slic3r/Linux/lib/std/unicore/lib/Jt/C.pl +15 -0
  1305. data/Slic3r/Linux/lib/std/unicore/lib/Jt/D.pl +41 -0
  1306. data/Slic3r/Linux/lib/std/unicore/lib/Jt/R.pl +40 -0
  1307. data/Slic3r/Linux/lib/std/unicore/lib/Jt/T.pl +226 -0
  1308. data/Slic3r/Linux/lib/std/unicore/lib/Jt/U.pl +231 -0
  1309. data/Slic3r/Linux/lib/std/unicore/lib/LOE/N.pl +18 -0
  1310. data/Slic3r/Linux/lib/std/unicore/lib/Lb/AI.pl +117 -0
  1311. data/Slic3r/Linux/lib/std/unicore/lib/Lb/AL.pl +576 -0
  1312. data/Slic3r/Linux/lib/std/unicore/lib/Lb/B2.pl +13 -0
  1313. data/Slic3r/Linux/lib/std/unicore/lib/Lb/BA.pl +74 -0
  1314. data/Slic3r/Linux/lib/std/unicore/lib/Lb/BB.pl +24 -0
  1315. data/Slic3r/Linux/lib/std/unicore/lib/Lb/BK.pl +14 -0
  1316. data/Slic3r/Linux/lib/std/unicore/lib/Lb/CB.pl +13 -0
  1317. data/Slic3r/Linux/lib/std/unicore/lib/Lb/CL.pl +91 -0
  1318. data/Slic3r/Linux/lib/std/unicore/lib/Lb/CM.pl +189 -0
  1319. data/Slic3r/Linux/lib/std/unicore/lib/Lb/CP.pl +14 -0
  1320. data/Slic3r/Linux/lib/std/unicore/lib/Lb/EX.pl +34 -0
  1321. data/Slic3r/Linux/lib/std/unicore/lib/Lb/GL.pl +23 -0
  1322. data/Slic3r/Linux/lib/std/unicore/lib/Lb/HY.pl +13 -0
  1323. data/Slic3r/Linux/lib/std/unicore/lib/Lb/ID.pl +85 -0
  1324. data/Slic3r/Linux/lib/std/unicore/lib/Lb/IN.pl +14 -0
  1325. data/Slic3r/Linux/lib/std/unicore/lib/Lb/IS.pl +22 -0
  1326. data/Slic3r/Linux/lib/std/unicore/lib/Lb/NL.pl +13 -0
  1327. data/Slic3r/Linux/lib/std/unicore/lib/Lb/NS.pl +49 -0
  1328. data/Slic3r/Linux/lib/std/unicore/lib/Lb/NU.pl +50 -0
  1329. data/Slic3r/Linux/lib/std/unicore/lib/Lb/OP.pl +91 -0
  1330. data/Slic3r/Linux/lib/std/unicore/lib/Lb/PO.pl +30 -0
  1331. data/Slic3r/Linux/lib/std/unicore/lib/Lb/PR.pl +31 -0
  1332. data/Slic3r/Linux/lib/std/unicore/lib/Lb/QU.pl +24 -0
  1333. data/Slic3r/Linux/lib/std/unicore/lib/Lb/SA.pl +49 -0
  1334. data/Slic3r/Linux/lib/std/unicore/lib/Lb/SG.pl +13 -0
  1335. data/Slic3r/Linux/lib/std/unicore/lib/Lb/SP.pl +13 -0
  1336. data/Slic3r/Linux/lib/std/unicore/lib/Lb/SY.pl +13 -0
  1337. data/Slic3r/Linux/lib/std/unicore/lib/Lb/WJ.pl +14 -0
  1338. data/Slic3r/Linux/lib/std/unicore/lib/Lb/XX.pl +505 -0
  1339. data/Slic3r/Linux/lib/std/unicore/lib/Lb/ZW.pl +13 -0
  1340. data/Slic3r/Linux/lib/std/unicore/lib/Lower/N.pl +625 -0
  1341. data/Slic3r/Linux/lib/std/unicore/lib/Lower/Y.pl +624 -0
  1342. data/Slic3r/Linux/lib/std/unicore/lib/Math/N.pl +119 -0
  1343. data/Slic3r/Linux/lib/std/unicore/lib/Math/Y.pl +118 -0
  1344. data/Slic3r/Linux/lib/std/unicore/lib/NChar/N.pl +30 -0
  1345. data/Slic3r/Linux/lib/std/unicore/lib/NChar/Y.pl +30 -0
  1346. data/Slic3r/Linux/lib/std/unicore/lib/NFCQC/Y.pl +118 -0
  1347. data/Slic3r/Linux/lib/std/unicore/lib/NFDQC/N.pl +239 -0
  1348. data/Slic3r/Linux/lib/std/unicore/lib/NFDQC/Y.pl +240 -0
  1349. data/Slic3r/Linux/lib/std/unicore/lib/NFKCQC/M.pl +46 -0
  1350. data/Slic3r/Linux/lib/std/unicore/lib/NFKCQC/N.pl +225 -0
  1351. data/Slic3r/Linux/lib/std/unicore/lib/NFKCQC/Y.pl +256 -0
  1352. data/Slic3r/Linux/lib/std/unicore/lib/NFKDQC/N.pl +361 -0
  1353. data/Slic3r/Linux/lib/std/unicore/lib/Nt/De.pl +50 -0
  1354. data/Slic3r/Linux/lib/std/unicore/lib/Nt/Di.pl +32 -0
  1355. data/Slic3r/Linux/lib/std/unicore/lib/Nt/Nu.pl +134 -0
  1356. data/Slic3r/Linux/lib/std/unicore/lib/Nv/0.pl +67 -0
  1357. data/Slic3r/Linux/lib/std/unicore/lib/Nv/1.pl +102 -0
  1358. data/Slic3r/Linux/lib/std/unicore/lib/Nv/10.pl +47 -0
  1359. data/Slic3r/Linux/lib/std/unicore/lib/Nv/100.pl +32 -0
  1360. data/Slic3r/Linux/lib/std/unicore/lib/Nv/1000.pl +28 -0
  1361. data/Slic3r/Linux/lib/std/unicore/lib/Nv/10000.pl +19 -0
  1362. data/Slic3r/Linux/lib/std/unicore/lib/Nv/100000.pl +13 -0
  1363. data/Slic3r/Linux/lib/std/unicore/lib/Nv/10000000.pl +14 -0
  1364. data/Slic3r/Linux/lib/std/unicore/lib/Nv/10000002.pl +13 -0
  1365. data/Slic3r/Linux/lib/std/unicore/lib/Nv/11.pl +18 -0
  1366. data/Slic3r/Linux/lib/std/unicore/lib/Nv/11_2.pl +13 -0
  1367. data/Slic3r/Linux/lib/std/unicore/lib/Nv/12.pl +18 -0
  1368. data/Slic3r/Linux/lib/std/unicore/lib/Nv/13.pl +16 -0
  1369. data/Slic3r/Linux/lib/std/unicore/lib/Nv/13_2.pl +13 -0
  1370. data/Slic3r/Linux/lib/std/unicore/lib/Nv/14.pl +16 -0
  1371. data/Slic3r/Linux/lib/std/unicore/lib/Nv/15.pl +16 -0
  1372. data/Slic3r/Linux/lib/std/unicore/lib/Nv/15_2.pl +13 -0
  1373. data/Slic3r/Linux/lib/std/unicore/lib/Nv/16.pl +17 -0
  1374. data/Slic3r/Linux/lib/std/unicore/lib/Nv/17.pl +17 -0
  1375. data/Slic3r/Linux/lib/std/unicore/lib/Nv/17_2.pl +13 -0
  1376. data/Slic3r/Linux/lib/std/unicore/lib/Nv/18.pl +17 -0
  1377. data/Slic3r/Linux/lib/std/unicore/lib/Nv/19.pl +17 -0
  1378. data/Slic3r/Linux/lib/std/unicore/lib/Nv/1_10.pl +13 -0
  1379. data/Slic3r/Linux/lib/std/unicore/lib/Nv/1_16.pl +15 -0
  1380. data/Slic3r/Linux/lib/std/unicore/lib/Nv/1_2.pl +21 -0
  1381. data/Slic3r/Linux/lib/std/unicore/lib/Nv/1_3.pl +16 -0
  1382. data/Slic3r/Linux/lib/std/unicore/lib/Nv/1_4.pl +21 -0
  1383. data/Slic3r/Linux/lib/std/unicore/lib/Nv/1_5.pl +13 -0
  1384. data/Slic3r/Linux/lib/std/unicore/lib/Nv/1_6.pl +14 -0
  1385. data/Slic3r/Linux/lib/std/unicore/lib/Nv/1_7.pl +13 -0
  1386. data/Slic3r/Linux/lib/std/unicore/lib/Nv/1_8.pl +17 -0
  1387. data/Slic3r/Linux/lib/std/unicore/lib/Nv/1_9.pl +13 -0
  1388. data/Slic3r/Linux/lib/std/unicore/lib/Nv/2.pl +105 -0
  1389. data/Slic3r/Linux/lib/std/unicore/lib/Nv/20.pl +30 -0
  1390. data/Slic3r/Linux/lib/std/unicore/lib/Nv/200.pl +14 -0
  1391. data/Slic3r/Linux/lib/std/unicore/lib/Nv/2000.pl +13 -0
  1392. data/Slic3r/Linux/lib/std/unicore/lib/Nv/20000.pl +13 -0
  1393. data/Slic3r/Linux/lib/std/unicore/lib/Nv/21.pl +13 -0
  1394. data/Slic3r/Linux/lib/std/unicore/lib/Nv/22.pl +13 -0
  1395. data/Slic3r/Linux/lib/std/unicore/lib/Nv/23.pl +13 -0
  1396. data/Slic3r/Linux/lib/std/unicore/lib/Nv/24.pl +13 -0
  1397. data/Slic3r/Linux/lib/std/unicore/lib/Nv/25.pl +13 -0
  1398. data/Slic3r/Linux/lib/std/unicore/lib/Nv/26.pl +13 -0
  1399. data/Slic3r/Linux/lib/std/unicore/lib/Nv/27.pl +13 -0
  1400. data/Slic3r/Linux/lib/std/unicore/lib/Nv/28.pl +13 -0
  1401. data/Slic3r/Linux/lib/std/unicore/lib/Nv/29.pl +13 -0
  1402. data/Slic3r/Linux/lib/std/unicore/lib/Nv/2_3.pl +17 -0
  1403. data/Slic3r/Linux/lib/std/unicore/lib/Nv/2_5.pl +13 -0
  1404. data/Slic3r/Linux/lib/std/unicore/lib/Nv/3.pl +103 -0
  1405. data/Slic3r/Linux/lib/std/unicore/lib/Nv/30.pl +22 -0
  1406. data/Slic3r/Linux/lib/std/unicore/lib/Nv/300.pl +15 -0
  1407. data/Slic3r/Linux/lib/std/unicore/lib/Nv/3000.pl +13 -0
  1408. data/Slic3r/Linux/lib/std/unicore/lib/Nv/30000.pl +13 -0
  1409. data/Slic3r/Linux/lib/std/unicore/lib/Nv/31.pl +13 -0
  1410. data/Slic3r/Linux/lib/std/unicore/lib/Nv/32.pl +13 -0
  1411. data/Slic3r/Linux/lib/std/unicore/lib/Nv/33.pl +13 -0
  1412. data/Slic3r/Linux/lib/std/unicore/lib/Nv/34.pl +13 -0
  1413. data/Slic3r/Linux/lib/std/unicore/lib/Nv/35.pl +13 -0
  1414. data/Slic3r/Linux/lib/std/unicore/lib/Nv/36.pl +13 -0
  1415. data/Slic3r/Linux/lib/std/unicore/lib/Nv/37.pl +13 -0
  1416. data/Slic3r/Linux/lib/std/unicore/lib/Nv/38.pl +13 -0
  1417. data/Slic3r/Linux/lib/std/unicore/lib/Nv/39.pl +13 -0
  1418. data/Slic3r/Linux/lib/std/unicore/lib/Nv/3_16.pl +15 -0
  1419. data/Slic3r/Linux/lib/std/unicore/lib/Nv/3_2.pl +13 -0
  1420. data/Slic3r/Linux/lib/std/unicore/lib/Nv/3_4.pl +18 -0
  1421. data/Slic3r/Linux/lib/std/unicore/lib/Nv/3_5.pl +13 -0
  1422. data/Slic3r/Linux/lib/std/unicore/lib/Nv/3_8.pl +13 -0
  1423. data/Slic3r/Linux/lib/std/unicore/lib/Nv/4.pl +97 -0
  1424. data/Slic3r/Linux/lib/std/unicore/lib/Nv/40.pl +21 -0
  1425. data/Slic3r/Linux/lib/std/unicore/lib/Nv/400.pl +14 -0
  1426. data/Slic3r/Linux/lib/std/unicore/lib/Nv/4000.pl +13 -0
  1427. data/Slic3r/Linux/lib/std/unicore/lib/Nv/40000.pl +13 -0
  1428. data/Slic3r/Linux/lib/std/unicore/lib/Nv/41.pl +13 -0
  1429. data/Slic3r/Linux/lib/std/unicore/lib/Nv/42.pl +13 -0
  1430. data/Slic3r/Linux/lib/std/unicore/lib/Nv/43.pl +13 -0
  1431. data/Slic3r/Linux/lib/std/unicore/lib/Nv/44.pl +13 -0
  1432. data/Slic3r/Linux/lib/std/unicore/lib/Nv/45.pl +13 -0
  1433. data/Slic3r/Linux/lib/std/unicore/lib/Nv/46.pl +13 -0
  1434. data/Slic3r/Linux/lib/std/unicore/lib/Nv/47.pl +13 -0
  1435. data/Slic3r/Linux/lib/std/unicore/lib/Nv/48.pl +13 -0
  1436. data/Slic3r/Linux/lib/std/unicore/lib/Nv/49.pl +13 -0
  1437. data/Slic3r/Linux/lib/std/unicore/lib/Nv/4_5.pl +13 -0
  1438. data/Slic3r/Linux/lib/std/unicore/lib/Nv/5.pl +97 -0
  1439. data/Slic3r/Linux/lib/std/unicore/lib/Nv/50.pl +28 -0
  1440. data/Slic3r/Linux/lib/std/unicore/lib/Nv/500.pl +20 -0
  1441. data/Slic3r/Linux/lib/std/unicore/lib/Nv/5000.pl +17 -0
  1442. data/Slic3r/Linux/lib/std/unicore/lib/Nv/50000.pl +16 -0
  1443. data/Slic3r/Linux/lib/std/unicore/lib/Nv/5_2.pl +13 -0
  1444. data/Slic3r/Linux/lib/std/unicore/lib/Nv/5_6.pl +14 -0
  1445. data/Slic3r/Linux/lib/std/unicore/lib/Nv/5_8.pl +13 -0
  1446. data/Slic3r/Linux/lib/std/unicore/lib/Nv/6.pl +90 -0
  1447. data/Slic3r/Linux/lib/std/unicore/lib/Nv/60.pl +17 -0
  1448. data/Slic3r/Linux/lib/std/unicore/lib/Nv/600.pl +14 -0
  1449. data/Slic3r/Linux/lib/std/unicore/lib/Nv/6000.pl +13 -0
  1450. data/Slic3r/Linux/lib/std/unicore/lib/Nv/60000.pl +13 -0
  1451. data/Slic3r/Linux/lib/std/unicore/lib/Nv/7.pl +87 -0
  1452. data/Slic3r/Linux/lib/std/unicore/lib/Nv/70.pl +17 -0
  1453. data/Slic3r/Linux/lib/std/unicore/lib/Nv/700.pl +14 -0
  1454. data/Slic3r/Linux/lib/std/unicore/lib/Nv/7000.pl +13 -0
  1455. data/Slic3r/Linux/lib/std/unicore/lib/Nv/70000.pl +13 -0
  1456. data/Slic3r/Linux/lib/std/unicore/lib/Nv/7_2.pl +13 -0
  1457. data/Slic3r/Linux/lib/std/unicore/lib/Nv/7_8.pl +13 -0
  1458. data/Slic3r/Linux/lib/std/unicore/lib/Nv/8.pl +84 -0
  1459. data/Slic3r/Linux/lib/std/unicore/lib/Nv/80.pl +17 -0
  1460. data/Slic3r/Linux/lib/std/unicore/lib/Nv/800.pl +14 -0
  1461. data/Slic3r/Linux/lib/std/unicore/lib/Nv/8000.pl +13 -0
  1462. data/Slic3r/Linux/lib/std/unicore/lib/Nv/80000.pl +13 -0
  1463. data/Slic3r/Linux/lib/std/unicore/lib/Nv/9.pl +86 -0
  1464. data/Slic3r/Linux/lib/std/unicore/lib/Nv/90.pl +18 -0
  1465. data/Slic3r/Linux/lib/std/unicore/lib/Nv/900.pl +15 -0
  1466. data/Slic3r/Linux/lib/std/unicore/lib/Nv/9000.pl +13 -0
  1467. data/Slic3r/Linux/lib/std/unicore/lib/Nv/90000.pl +13 -0
  1468. data/Slic3r/Linux/lib/std/unicore/lib/Nv/9_2.pl +13 -0
  1469. data/Slic3r/Linux/lib/std/unicore/lib/Nv/NaN.pl +170 -0
  1470. data/Slic3r/Linux/lib/std/unicore/lib/Nv/_1_2.pl +13 -0
  1471. data/Slic3r/Linux/lib/std/unicore/lib/OAlpha/N.pl +158 -0
  1472. data/Slic3r/Linux/lib/std/unicore/lib/OAlpha/Y.pl +157 -0
  1473. data/Slic3r/Linux/lib/std/unicore/lib/ODI/N.pl +23 -0
  1474. data/Slic3r/Linux/lib/std/unicore/lib/ODI/Y.pl +22 -0
  1475. data/Slic3r/Linux/lib/std/unicore/lib/OGrExt/N.pl +29 -0
  1476. data/Slic3r/Linux/lib/std/unicore/lib/OGrExt/Y.pl +28 -0
  1477. data/Slic3r/Linux/lib/std/unicore/lib/OIDC/N.pl +17 -0
  1478. data/Slic3r/Linux/lib/std/unicore/lib/OIDC/Y.pl +16 -0
  1479. data/Slic3r/Linux/lib/std/unicore/lib/OIDS/N.pl +16 -0
  1480. data/Slic3r/Linux/lib/std/unicore/lib/OIDS/Y.pl +15 -0
  1481. data/Slic3r/Linux/lib/std/unicore/lib/OLower/N.pl +26 -0
  1482. data/Slic3r/Linux/lib/std/unicore/lib/OLower/Y.pl +25 -0
  1483. data/Slic3r/Linux/lib/std/unicore/lib/OMath/N.pl +113 -0
  1484. data/Slic3r/Linux/lib/std/unicore/lib/OMath/Y.pl +112 -0
  1485. data/Slic3r/Linux/lib/std/unicore/lib/OUpper/N.pl +15 -0
  1486. data/Slic3r/Linux/lib/std/unicore/lib/OUpper/Y.pl +14 -0
  1487. data/Slic3r/Linux/lib/std/unicore/lib/PatSyn/N.pl +41 -0
  1488. data/Slic3r/Linux/lib/std/unicore/lib/PatSyn/Y.pl +40 -0
  1489. data/Slic3r/Linux/lib/std/unicore/lib/PatWS/N.pl +18 -0
  1490. data/Slic3r/Linux/lib/std/unicore/lib/PatWS/Y.pl +17 -0
  1491. data/Slic3r/Linux/lib/std/unicore/lib/Perl/Alnum.pl +521 -0
  1492. data/Slic3r/Linux/lib/std/unicore/lib/Perl/Any.pl +13 -0
  1493. data/Slic3r/Linux/lib/std/unicore/lib/Perl/Assigned.pl +513 -0
  1494. data/Slic3r/Linux/lib/std/unicore/lib/Perl/Blank.pl +21 -0
  1495. data/Slic3r/Linux/lib/std/unicore/lib/Perl/Graph.pl +518 -0
  1496. data/Slic3r/Linux/lib/std/unicore/lib/Perl/PerlSpac.pl +15 -0
  1497. data/Slic3r/Linux/lib/std/unicore/lib/Perl/PerlWord.pl +16 -0
  1498. data/Slic3r/Linux/lib/std/unicore/lib/Perl/PosixAln.pl +15 -0
  1499. data/Slic3r/Linux/lib/std/unicore/lib/Perl/PosixAlp.pl +14 -0
  1500. data/Slic3r/Linux/lib/std/unicore/lib/Perl/PosixBla.pl +14 -0
  1501. data/Slic3r/Linux/lib/std/unicore/lib/Perl/PosixCnt.pl +14 -0
  1502. data/Slic3r/Linux/lib/std/unicore/lib/Perl/PosixDig.pl +13 -0
  1503. data/Slic3r/Linux/lib/std/unicore/lib/Perl/PosixGra.pl +13 -0
  1504. data/Slic3r/Linux/lib/std/unicore/lib/Perl/PosixLow.pl +13 -0
  1505. data/Slic3r/Linux/lib/std/unicore/lib/Perl/PosixPri.pl +13 -0
  1506. data/Slic3r/Linux/lib/std/unicore/lib/Perl/PosixPun.pl +16 -0
  1507. data/Slic3r/Linux/lib/std/unicore/lib/Perl/PosixSpa.pl +14 -0
  1508. data/Slic3r/Linux/lib/std/unicore/lib/Perl/PosixUpp.pl +13 -0
  1509. data/Slic3r/Linux/lib/std/unicore/lib/Perl/Print.pl +515 -0
  1510. data/Slic3r/Linux/lib/std/unicore/lib/Perl/SpacePer.pl +24 -0
  1511. data/Slic3r/Linux/lib/std/unicore/lib/Perl/Title.pl +22 -0
  1512. data/Slic3r/Linux/lib/std/unicore/lib/Perl/VertSpac.pl +15 -0
  1513. data/Slic3r/Linux/lib/std/unicore/lib/Perl/Word.pl +526 -0
  1514. data/Slic3r/Linux/lib/std/unicore/lib/Perl/XPosixPu.pl +140 -0
  1515. data/Slic3r/Linux/lib/std/unicore/lib/Perl/_XBegin.pl +30 -0
  1516. data/Slic3r/Linux/lib/std/unicore/lib/Perl/_XExtend.pl +206 -0
  1517. data/Slic3r/Linux/lib/std/unicore/lib/Perl/_XLVLVTV.pl +15 -0
  1518. data/Slic3r/Linux/lib/std/unicore/lib/QMark/N.pl +25 -0
  1519. data/Slic3r/Linux/lib/std/unicore/lib/QMark/Y.pl +24 -0
  1520. data/Slic3r/Linux/lib/std/unicore/lib/Radical/N.pl +16 -0
  1521. data/Slic3r/Linux/lib/std/unicore/lib/Radical/Y.pl +15 -0
  1522. data/Slic3r/Linux/lib/std/unicore/lib/SB/AT.pl +16 -0
  1523. data/Slic3r/Linux/lib/std/unicore/lib/SB/CL.pl +53 -0
  1524. data/Slic3r/Linux/lib/std/unicore/lib/SB/EX.pl +207 -0
  1525. data/Slic3r/Linux/lib/std/unicore/lib/SB/FO.pl +28 -0
  1526. data/Slic3r/Linux/lib/std/unicore/lib/SB/LE.pl +362 -0
  1527. data/Slic3r/Linux/lib/std/unicore/lib/SB/LO.pl +623 -0
  1528. data/Slic3r/Linux/lib/std/unicore/lib/SB/SC.pl +31 -0
  1529. data/Slic3r/Linux/lib/std/unicore/lib/SB/SE.pl +14 -0
  1530. data/Slic3r/Linux/lib/std/unicore/lib/SB/ST.pl +56 -0
  1531. data/Slic3r/Linux/lib/std/unicore/lib/SB/Sp.pl +22 -0
  1532. data/Slic3r/Linux/lib/std/unicore/lib/SB/UP.pl +620 -0
  1533. data/Slic3r/Linux/lib/std/unicore/lib/SB/XX.pl +584 -0
  1534. data/Slic3r/Linux/lib/std/unicore/lib/SD/N.pl +44 -0
  1535. data/Slic3r/Linux/lib/std/unicore/lib/SD/Y.pl +43 -0
  1536. data/Slic3r/Linux/lib/std/unicore/lib/STerm/N.pl +60 -0
  1537. data/Slic3r/Linux/lib/std/unicore/lib/STerm/Y.pl +59 -0
  1538. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Arab.pl +31 -0
  1539. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Armi.pl +14 -0
  1540. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Armn.pl +17 -0
  1541. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Avst.pl +14 -0
  1542. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Bali.pl +14 -0
  1543. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Bamu.pl +14 -0
  1544. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Batk.pl +14 -0
  1545. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Beng.pl +26 -0
  1546. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Bopo.pl +15 -0
  1547. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Brah.pl +14 -0
  1548. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Bugi.pl +14 -0
  1549. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Buhd.pl +13 -0
  1550. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Cans.pl +14 -0
  1551. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Cari.pl +13 -0
  1552. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Cham.pl +16 -0
  1553. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Cher.pl +13 -0
  1554. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Copt.pl +15 -0
  1555. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Cprt.pl +18 -0
  1556. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Cyrl.pl +19 -0
  1557. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Deva.pl +18 -0
  1558. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Egyp.pl +13 -0
  1559. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Ethi.pl +44 -0
  1560. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Geor.pl +16 -0
  1561. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Glag.pl +14 -0
  1562. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Goth.pl +13 -0
  1563. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Grek.pl +45 -0
  1564. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Gujr.pl +26 -0
  1565. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Guru.pl +28 -0
  1566. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Han.pl +28 -0
  1567. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Hang.pl +26 -0
  1568. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Hano.pl +13 -0
  1569. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Hebr.pl +21 -0
  1570. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Hira.pl +16 -0
  1571. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Ital.pl +14 -0
  1572. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Java.pl +15 -0
  1573. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Kana.pl +20 -0
  1574. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Khar.pl +20 -0
  1575. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Khmr.pl +16 -0
  1576. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Knda.pl +26 -0
  1577. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Kthi.pl +13 -0
  1578. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Lana.pl +17 -0
  1579. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Lao.pl +30 -0
  1580. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Latn.pl +42 -0
  1581. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Lepc.pl +15 -0
  1582. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Limb.pl +17 -0
  1583. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Linb.pl +19 -0
  1584. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Lyci.pl +13 -0
  1585. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Lydi.pl +14 -0
  1586. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Mand.pl +14 -0
  1587. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Mlym.pl +23 -0
  1588. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Mong.pl +18 -0
  1589. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Mtei.pl +14 -0
  1590. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Mymr.pl +14 -0
  1591. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Nko.pl +13 -0
  1592. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Ogam.pl +13 -0
  1593. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Orkh.pl +13 -0
  1594. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Orya.pl +26 -0
  1595. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Osma.pl +14 -0
  1596. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Phag.pl +13 -0
  1597. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Phli.pl +14 -0
  1598. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Phnx.pl +14 -0
  1599. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Prti.pl +14 -0
  1600. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Rjng.pl +14 -0
  1601. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Runr.pl +14 -0
  1602. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Samr.pl +14 -0
  1603. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Saur.pl +14 -0
  1604. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Sinh.pl +23 -0
  1605. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Sund.pl +14 -0
  1606. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Sylo.pl +13 -0
  1607. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Syrc.pl +15 -0
  1608. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Tagb.pl +15 -0
  1609. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Tale.pl +14 -0
  1610. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Talu.pl +16 -0
  1611. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Taml.pl +28 -0
  1612. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Tavt.pl +14 -0
  1613. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Telu.pl +26 -0
  1614. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Tfng.pl +15 -0
  1615. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Tglg.pl +14 -0
  1616. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Thaa.pl +13 -0
  1617. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Thai.pl +14 -0
  1618. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Tibt.pl +19 -0
  1619. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Ugar.pl +14 -0
  1620. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Vai.pl +13 -0
  1621. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Xpeo.pl +14 -0
  1622. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Xsux.pl +15 -0
  1623. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Yi.pl +14 -0
  1624. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Zinh.pl +36 -0
  1625. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Zyyy.pl +181 -0
  1626. data/Slic3r/Linux/lib/std/unicore/lib/Sc/Zzzz.pl +511 -0
  1627. data/Slic3r/Linux/lib/std/unicore/lib/Space/N.pl +24 -0
  1628. data/Slic3r/Linux/lib/std/unicore/lib/Space/Y.pl +23 -0
  1629. data/Slic3r/Linux/lib/std/unicore/lib/Term/N.pl +80 -0
  1630. data/Slic3r/Linux/lib/std/unicore/lib/Term/Y.pl +79 -0
  1631. data/Slic3r/Linux/lib/std/unicore/lib/UIdeo/N.pl +25 -0
  1632. data/Slic3r/Linux/lib/std/unicore/lib/UIdeo/Y.pl +24 -0
  1633. data/Slic3r/Linux/lib/std/unicore/lib/Upper/N.pl +618 -0
  1634. data/Slic3r/Linux/lib/std/unicore/lib/Upper/Y.pl +617 -0
  1635. data/Slic3r/Linux/lib/std/unicore/lib/VS/N.pl +16 -0
  1636. data/Slic3r/Linux/lib/std/unicore/lib/VS/Y.pl +15 -0
  1637. data/Slic3r/Linux/lib/std/unicore/lib/WB/EX.pl +18 -0
  1638. data/Slic3r/Linux/lib/std/unicore/lib/WB/FO.pl +27 -0
  1639. data/Slic3r/Linux/lib/std/unicore/lib/WB/KA.pl +21 -0
  1640. data/Slic3r/Linux/lib/std/unicore/lib/WB/LE.pl +388 -0
  1641. data/Slic3r/Linux/lib/std/unicore/lib/WB/MB.pl +19 -0
  1642. data/Slic3r/Linux/lib/std/unicore/lib/WB/ML.pl +20 -0
  1643. data/Slic3r/Linux/lib/std/unicore/lib/WB/MN.pl +26 -0
  1644. data/Slic3r/Linux/lib/std/unicore/lib/WB/NL.pl +15 -0
  1645. data/Slic3r/Linux/lib/std/unicore/lib/WB/NU.pl +50 -0
  1646. data/Slic3r/Linux/lib/std/unicore/lib/WB/XX.pl +539 -0
  1647. data/Slic3r/Linux/lib/std/unicore/lib/XIDC/N.pl +534 -0
  1648. data/Slic3r/Linux/lib/std/unicore/lib/XIDC/Y.pl +533 -0
  1649. data/Slic3r/Linux/lib/std/unicore/lib/XIDS/N.pl +457 -0
  1650. data/Slic3r/Linux/lib/std/unicore/lib/XIDS/Y.pl +456 -0
  1651. data/Slic3r/Linux/lib/std/utf8.pm +214 -0
  1652. data/Slic3r/Linux/lib/std/utf8_heavy.pl +550 -0
  1653. data/Slic3r/Linux/lib/vrt/528ccea98cad02a5f453a7135f9ca183/package.lib +0 -0
  1654. data/Slic3r/Linux/lib/vrt/804f15d0b003b04c3feb68e47adacf8d/package.lib +1 -0
  1655. data/Slic3r/Linux/lib/vrt/fa119178d164dcf97f19aecc876231c0/package.lib +0 -0
  1656. data/Slic3r/Linux/res/Slic3r.icns +0 -0
  1657. data/Slic3r/Linux/res/Slic3r.ico +0 -0
  1658. data/Slic3r/Linux/res/Slic3r.png +0 -0
  1659. data/Slic3r/Linux/res/Slic3r_128px.png +0 -0
  1660. data/Slic3r/Linux/res/Slic3r_192px.png +0 -0
  1661. data/Slic3r/Linux/res/Slic3r_192px_transparent.png +0 -0
  1662. data/Slic3r/Linux/res/add.png +0 -0
  1663. data/Slic3r/Linux/res/arrow_out.png +0 -0
  1664. data/Slic3r/Linux/res/arrow_rotate_anticlockwise.png +0 -0
  1665. data/Slic3r/Linux/res/arrow_rotate_clockwise.png +0 -0
  1666. data/Slic3r/Linux/res/arrow_up.png +0 -0
  1667. data/Slic3r/Linux/res/box.png +0 -0
  1668. data/Slic3r/Linux/res/brick.png +0 -0
  1669. data/Slic3r/Linux/res/brick_add.png +0 -0
  1670. data/Slic3r/Linux/res/brick_delete.png +0 -0
  1671. data/Slic3r/Linux/res/brick_go.png +0 -0
  1672. data/Slic3r/Linux/res/bricks.png +0 -0
  1673. data/Slic3r/Linux/res/building.png +0 -0
  1674. data/Slic3r/Linux/res/bullet_black.png +0 -0
  1675. data/Slic3r/Linux/res/bullet_blue.png +0 -0
  1676. data/Slic3r/Linux/res/bullet_white.png +0 -0
  1677. data/Slic3r/Linux/res/cog.png +0 -0
  1678. data/Slic3r/Linux/res/cog_go.png +0 -0
  1679. data/Slic3r/Linux/res/cross.png +0 -0
  1680. data/Slic3r/Linux/res/delete.png +0 -0
  1681. data/Slic3r/Linux/res/disk.png +0 -0
  1682. data/Slic3r/Linux/res/error.png +0 -0
  1683. data/Slic3r/Linux/res/funnel.png +0 -0
  1684. data/Slic3r/Linux/res/hourglass.png +0 -0
  1685. data/Slic3r/Linux/res/layers.png +0 -0
  1686. data/Slic3r/Linux/res/note.png +0 -0
  1687. data/Slic3r/Linux/res/package.png +0 -0
  1688. data/Slic3r/Linux/res/package_green.png +0 -0
  1689. data/Slic3r/Linux/res/page_white_go.png +0 -0
  1690. data/Slic3r/Linux/res/plugin.png +0 -0
  1691. data/Slic3r/Linux/res/printer_empty.png +0 -0
  1692. data/Slic3r/Linux/res/shading.png +0 -0
  1693. data/Slic3r/Linux/res/shape_ungroup.png +0 -0
  1694. data/Slic3r/Linux/res/spool.png +0 -0
  1695. data/Slic3r/Linux/res/tag_blue.png +0 -0
  1696. data/Slic3r/Linux/res/time.png +0 -0
  1697. data/Slic3r/Linux/res/wrench.png +0 -0
  1698. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libperl.dylib +0 -0
  1699. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_baseu-2.9.3.0.0.dylib +0 -0
  1700. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_baseu-2.9.3.dylib +1 -0
  1701. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_baseu-2.9.dylib +1 -0
  1702. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_baseu_net-2.9.3.0.0.dylib +0 -0
  1703. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_baseu_net-2.9.3.dylib +1 -0
  1704. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_baseu_net-2.9.dylib +1 -0
  1705. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_adv-2.9.3.0.0.dylib +0 -0
  1706. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_adv-2.9.3.dylib +1 -0
  1707. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_adv-2.9.dylib +1 -0
  1708. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_core-2.9.3.0.0.dylib +0 -0
  1709. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_core-2.9.3.dylib +1 -0
  1710. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_core-2.9.dylib +1 -0
  1711. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_gl-2.9.3.0.0.dylib +0 -0
  1712. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_gl-2.9.3.dylib +1 -0
  1713. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_gl-2.9.dylib +1 -0
  1714. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_html-2.9.3.0.0.dylib +0 -0
  1715. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_html-2.9.3.dylib +1 -0
  1716. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_html-2.9.dylib +1 -0
  1717. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_media-2.9.3.0.0.dylib +0 -0
  1718. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_media-2.9.3.dylib +1 -0
  1719. data/Slic3r/Mac/Slic3r.app/Contents/Frameworks/libwx_osx_cocoau_media-2.9.dylib +1 -0
  1720. data/Slic3r/Mac/Slic3r.app/Contents/Info.plist +27 -0
  1721. data/Slic3r/Mac/Slic3r.app/Contents/MacOS/slic3r +0 -0
  1722. data/Slic3r/Mac/Slic3r.app/Contents/PkgInfo +1 -0
  1723. data/Slic3r/Mac/Slic3r.app/Contents/Resources/Slic3r.icns +0 -0
  1724. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/std/Mozilla/CA.pm +99 -0
  1725. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/std/Mozilla/CA/cacert.pem +3366 -0
  1726. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/std/XML/SAX/ParserDetails.ini +16 -0
  1727. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/00fe171e54eaa45f327269069a84261c/SHA.bundle +0 -0
  1728. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/01641a74022c3bbdcd3a4cd5ffa26f07/ExpatXS.bundle +0 -0
  1729. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/02275a9ba60dd2657ec564332cc8c8a6/mro.bundle +0 -0
  1730. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/0599c4249af65dd82091e4b41e75dcac/GLCanvas.bundle +0 -0
  1731. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/0b007f4858c19ac489b6482dc8d8e973/Base64.bundle +0 -0
  1732. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/11897113663a72e0cf3a40f86569d0d3/package.lib +437 -0
  1733. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/181b750c50b989ea215e0c9788700590/scalar.bundle +0 -0
  1734. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/18e56ac547628015c934d8e62b2e59fb/shared.bundle +0 -0
  1735. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/193e996343c27253990f34ec93d7ae14/XS.bundle +0 -0
  1736. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/1e7eafa7ded7f14757bba03f9721336f/MD5.bundle +0 -0
  1737. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/2203e7a3df69c390965a2aa240378b54/FastCalc.bundle +0 -0
  1738. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/3b0e1864ce168232981b0e0b6e4ba639/Zlib.bundle +0 -0
  1739. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/4219a41428dfbeccc0004f15dc4778d8/Unicode.bundle +0 -0
  1740. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/42c3d19347a691f255d231da3d91f1ab/package.lib +332 -0
  1741. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/446150103e8711b6887777b796b96e92/Storable.bundle +0 -0
  1742. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/471029ae61c0427e58f24ac9e5a0cca5/package.lib +41 -0
  1743. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/4b2be1b5f4e6e6643e35d2fcdd27000d/Fcntl.bundle +0 -0
  1744. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/4c8cb4098e6eacc0dda716777c02e08e/Print.bundle +0 -0
  1745. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/51a64b55f893bfcb317be27527adb1c6/XSAccessor.bundle +0 -0
  1746. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/528ccea98cad02a5f453a7135f9ca183/package.lib +0 -0
  1747. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/5abe14a55ea43955299905c968f6b868/NamedCapture.bundle +0 -0
  1748. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/5da723b19d0784844a5d9228c25b1022/IO.bundle +0 -0
  1749. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/5efcd6c8c536b3b2d25ffece18e6cc7f/Byte.bundle +0 -0
  1750. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/62d4f6d2fa13586d2f8d48e80fcaad8d/re.bundle +0 -0
  1751. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/65951cec1d16610098f09e209050a4e5/encoding.bundle +0 -0
  1752. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/72315e121508feb38a782d3bd60cf0e1/Encode.bundle +0 -0
  1753. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/72f45450977a0f098e76b5b1270fb1fa/TW.bundle +0 -0
  1754. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/74f1151ea68af8b93e28a8d7b59bc6f1/Util.bundle +0 -0
  1755. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/7a1d45f404be604381d8b95f374ecae2/POSIX.bundle +0 -0
  1756. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/7a9108dfb82f49ad15e339776671a0c9/KR.bundle +0 -0
  1757. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/7e549424075365bb7bac11a08b208145/XS.bundle +0 -0
  1758. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/7e7926fce7d528168853b8dab2c9ccd2/Socket.bundle +0 -0
  1759. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/804f15d0b003b04c3feb68e47adacf8d/package.lib +1 -0
  1760. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/826014915c535a7285f886166a778440/Cwd.bundle +0 -0
  1761. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/83e7bddbda22f4666134d95e35b3292e/Grid.bundle +0 -0
  1762. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/8efb4e8160ee47f9e953900fd189e72c/Symbol.bundle +0 -0
  1763. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/9077b3800b946e19da99a53a92321f77/JP.bundle +0 -0
  1764. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/9425135f44548a4e211eabfbba86fdf7/B.bundle +0 -0
  1765. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/94c9b361d23d6847d023b9e82acbc595/UUID.bundle +0 -0
  1766. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/953dbc6f080a921c10f4fb4adf0a6ea7/SealRequireHints.bundle +0 -0
  1767. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/9f303c03e9bb3b3307210ed1399034f4/Dumper.bundle +0 -0
  1768. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/a3809d03e71342d25daf495917654688/indirect.bundle +0 -0
  1769. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/a499207f115577de989dae697bccf1f7/via.bundle +0 -0
  1770. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/a4ff00c6243840a7c5a181800d0a0e9f/Glob.bundle +0 -0
  1771. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/a8a5488c950b4ae4ab726834ab1f4629/Parser.bundle +0 -0
  1772. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/a927c16eae43f6d2d1fcbca4288c2613/Bzip2.bundle +0 -0
  1773. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/b2467e1e23f7295c8b0e819807403777/Check.bundle +0 -0
  1774. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/b75af51104891e1861cf27a85a06248f/SSLeay.bundle +0 -0
  1775. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/c04409d610134c279178eaab1c0cd45e/multidimensional.bundle +0 -0
  1776. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/c37c19e69c64f01f83616050a4290081/filehandles.bundle +0 -0
  1777. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/c63ee2950efe3f9517034e269406a6f1/Call.bundle +0 -0
  1778. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/c8b43a9fa99c2589e0af3851636037ae/threads.bundle +0 -0
  1779. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/c9bc0bb4eaabb8b3b85268094134ae30/SSLeay.bundle +0 -0
  1780. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/cb9c4ab6b50a6ba6e9a1c58866acb842/HiRes.bundle +0 -0
  1781. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/d73dc34729c26340077a511c9aeae54c/Langinfo.bundle +0 -0
  1782. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/e0833c18d9957e5ef93fd12ea63dc88c/Libm.bundle +0 -0
  1783. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/e4596f5a53563fc95d87c9738c6ed3f1/attributes.bundle +0 -0
  1784. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/e69ac1437c1fe7ba8a391d4a6e017895/DND.bundle +0 -0
  1785. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/f0daa614fb85c8dc08ddd86ef81f8546/EBCDIC.bundle +0 -0
  1786. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/f3d865c9882d669a56d9890365558ef3/Wx.bundle +0 -0
  1787. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/f77494368a2754d99fc9ae63725241b9/CN.bundle +0 -0
  1788. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/f7b6e5c51850d9c5b8f9f118bf8c79e5/OpenGL.bundle +0 -0
  1789. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/fa119178d164dcf97f19aecc876231c0/package.lib +0 -0
  1790. data/Slic3r/Mac/Slic3r.app/Contents/Resources/lib/vrt/ff1c32bbf4efed322b40618fa6cc887f/Html.bundle +0 -0
  1791. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/Slic3r.icns +0 -0
  1792. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/Slic3r.ico +0 -0
  1793. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/Slic3r.png +0 -0
  1794. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/Slic3r_128px.png +0 -0
  1795. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/Slic3r_192px.png +0 -0
  1796. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/Slic3r_192px_transparent.png +0 -0
  1797. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/add.png +0 -0
  1798. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/arrow_out.png +0 -0
  1799. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/arrow_rotate_anticlockwise.png +0 -0
  1800. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/arrow_rotate_clockwise.png +0 -0
  1801. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/arrow_up.png +0 -0
  1802. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/box.png +0 -0
  1803. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/brick.png +0 -0
  1804. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/brick_add.png +0 -0
  1805. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/brick_delete.png +0 -0
  1806. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/brick_go.png +0 -0
  1807. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/bricks.png +0 -0
  1808. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/building.png +0 -0
  1809. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/bullet_black.png +0 -0
  1810. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/bullet_blue.png +0 -0
  1811. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/bullet_white.png +0 -0
  1812. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/cog.png +0 -0
  1813. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/cog_go.png +0 -0
  1814. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/cross.png +0 -0
  1815. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/delete.png +0 -0
  1816. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/disk.png +0 -0
  1817. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/error.png +0 -0
  1818. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/funnel.png +0 -0
  1819. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/hourglass.png +0 -0
  1820. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/layers.png +0 -0
  1821. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/note.png +0 -0
  1822. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/package.png +0 -0
  1823. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/package_green.png +0 -0
  1824. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/page_white_go.png +0 -0
  1825. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/plugin.png +0 -0
  1826. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/printer_empty.png +0 -0
  1827. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/shading.png +0 -0
  1828. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/shape_ungroup.png +0 -0
  1829. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/spool.png +0 -0
  1830. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/tag_blue.png +0 -0
  1831. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/time.png +0 -0
  1832. data/Slic3r/Mac/Slic3r.app/Contents/Resources/res/wrench.png +0 -0
  1833. data/Slic3r/Win/bin/cpfworkrt/cpfworkrt.manifest +8 -0
  1834. data/Slic3r/Win/bin/cpfworkrt/libgcc_s_sjlj-1.dll +0 -0
  1835. data/Slic3r/Win/bin/cpfworkrt/libstdc++-6.dll +0 -0
  1836. data/Slic3r/Win/bin/cpfworkrt/perl514.dll +0 -0
  1837. data/Slic3r/Win/cpfworkrt/cpfworkrt.manifest +8 -0
  1838. data/Slic3r/Win/cpfworkrt/libgcc_s_sjlj-1.dll +0 -0
  1839. data/Slic3r/Win/cpfworkrt/libstdc++-6.dll +0 -0
  1840. data/Slic3r/Win/cpfworkrt/perl514.dll +0 -0
  1841. data/Slic3r/Win/dll/cpwgui.exe +0 -0
  1842. data/Slic3r/Win/dll/wxbase293u_gcc_citrusperl.dll +0 -0
  1843. data/Slic3r/Win/dll/wxbase293u_net_gcc_citrusperl.dll +0 -0
  1844. data/Slic3r/Win/dll/wxmsw293u_adv_gcc_citrusperl.dll +0 -0
  1845. data/Slic3r/Win/dll/wxmsw293u_core_gcc_citrusperl.dll +0 -0
  1846. data/Slic3r/Win/dll/wxmsw293u_gl_gcc_citrusperl.dll +0 -0
  1847. data/Slic3r/Win/dll/wxmsw293u_html_gcc_citrusperl.dll +0 -0
  1848. data/Slic3r/Win/lib/std/Mozilla/CA.pm +99 -0
  1849. data/Slic3r/Win/lib/std/Mozilla/CA/cacert.pem +3366 -0
  1850. data/Slic3r/Win/lib/std/XML/SAX/ParserDetails.ini +16 -0
  1851. data/Slic3r/Win/lib/vrt/00065b3cc7c31741588c51da0ebf7cfc/Storable.dll +0 -0
  1852. data/Slic3r/Win/lib/vrt/0e211ef5300e42b7129e72ce6934dd03/File.dll +0 -0
  1853. data/Slic3r/Win/lib/vrt/11897113663a72e0cf3a40f86569d0d3/package.lib +437 -0
  1854. data/Slic3r/Win/lib/vrt/13887bf5057dfc645e73f9cbc2107b0b/shared.dll +0 -0
  1855. data/Slic3r/Win/lib/vrt/13b74231834b96c1b29d9bb7ff9fc803/XSAccessor.dll +0 -0
  1856. data/Slic3r/Win/lib/vrt/17a8fd354d07706b1d8e07133653aefe/Unicode.dll +0 -0
  1857. data/Slic3r/Win/lib/vrt/1ff31eb32e672b10095dc07142eda94e/Byte.dll +0 -0
  1858. data/Slic3r/Win/lib/vrt/212acdb3b0d578c6c31b6f5b102aaf9f/OpenGL.dll +0 -0
  1859. data/Slic3r/Win/lib/vrt/212acdb3b0d578c6c31b6f5b102aaf9f/freeglut.dll +0 -0
  1860. data/Slic3r/Win/lib/vrt/2b09d17ec43a6c01f265254b54d60739/Dumper.dll +0 -0
  1861. data/Slic3r/Win/lib/vrt/2ce0a6f8648060f015cf6b795bedf11d/SHA.dll +0 -0
  1862. data/Slic3r/Win/lib/vrt/3545b2d83c9d9a29194f9ab80ec5474b/Fcntl.dll +0 -0
  1863. data/Slic3r/Win/lib/vrt/38786f297f552b7038b60152ad9b90fc/ExpatXS.dll +0 -0
  1864. data/Slic3r/Win/lib/vrt/3d306f1634430f34d0521f8ea684e9ec/SSLeay.dll +0 -0
  1865. data/Slic3r/Win/lib/vrt/3ea9b1cd80f790518c416324dd069ebd/encoding.dll +0 -0
  1866. data/Slic3r/Win/lib/vrt/41c42900fc0d462e9a31e174ac8a654c/Html.dll +0 -0
  1867. data/Slic3r/Win/lib/vrt/42c3d19347a691f255d231da3d91f1ab/package.lib +332 -0
  1868. data/Slic3r/Win/lib/vrt/4699e2a2c6a572106b4070861d78c22a/Parser.dll +0 -0
  1869. data/Slic3r/Win/lib/vrt/46c688003f4a63abb5816f68b951f727/MD5.dll +0 -0
  1870. data/Slic3r/Win/lib/vrt/471029ae61c0427e58f24ac9e5a0cca5/package.lib +41 -0
  1871. data/Slic3r/Win/lib/vrt/49bdccea41102e6d90906b74653d30ab/HiRes.dll +0 -0
  1872. data/Slic3r/Win/lib/vrt/4c9065158b425703c56336bd7fd5bbf2/SSLeay.dll +0 -0
  1873. data/Slic3r/Win/lib/vrt/50e0982503943dcf3f001fc2d17d4075/JP.dll +0 -0
  1874. data/Slic3r/Win/lib/vrt/528ccea98cad02a5f453a7135f9ca183/package.lib +0 -0
  1875. data/Slic3r/Win/lib/vrt/6419170f57dff2f058fefa3f8f37c897/EBCDIC.dll +0 -0
  1876. data/Slic3r/Win/lib/vrt/655af4e236089eadb910a60a39fbe815/attributes.dll +0 -0
  1877. data/Slic3r/Win/lib/vrt/6c123a3a5b411759cc21a293df5bed0e/SealRequireHints.dll +0 -0
  1878. data/Slic3r/Win/lib/vrt/7ba0890aa8ff0eed7abb9f76181bd637/Console.dll +0 -0
  1879. data/Slic3r/Win/lib/vrt/7ef678fd3db32983bdf488c788a3a763/IO.dll +0 -0
  1880. data/Slic3r/Win/lib/vrt/804f15d0b003b04c3feb68e47adacf8d/package.lib +1 -0
  1881. data/Slic3r/Win/lib/vrt/8f7c428c727a7d81643b50b598197734/API.dll +0 -0
  1882. data/Slic3r/Win/lib/vrt/8fa3f50b03f9cb0203031cf516aa3973/B.dll +0 -0
  1883. data/Slic3r/Win/lib/vrt/9573d0f8956394a9448b7cb70a24fed3/CN.dll +0 -0
  1884. data/Slic3r/Win/lib/vrt/9a02fe0b6c8a35ffbf56e88f9910abeb/Base64.dll +0 -0
  1885. data/Slic3r/Win/lib/vrt/9cc90b876890f13970933c948cbb4b2e/Print.dll +0 -0
  1886. data/Slic3r/Win/lib/vrt/9d4869e43aaebbcbfc9baec70819f444/indirect.dll +0 -0
  1887. data/Slic3r/Win/lib/vrt/a3600f18eb88b7c4835e2438eeda19b1/Symbol.dll +0 -0
  1888. data/Slic3r/Win/lib/vrt/a3719ad0fa76c06423d0397090ec4ed9/Libm.dll +0 -0
  1889. data/Slic3r/Win/lib/vrt/a40249e26296df558fcddd2c8cbfb2f6/UUID.dll +0 -0
  1890. data/Slic3r/Win/lib/vrt/aa455d4af51625c2acacb6716c0a6e01/scalar.dll +0 -0
  1891. data/Slic3r/Win/lib/vrt/aa976c80169f479f0613ff5283377098/Win32.dll +0 -0
  1892. data/Slic3r/Win/lib/vrt/ad648dbf31179700b4efd00b04f50dab/multidimensional.dll +0 -0
  1893. data/Slic3r/Win/lib/vrt/b48cd6cc5170110b04444736f8ca1a04/mro.dll +0 -0
  1894. data/Slic3r/Win/lib/vrt/b6a5c6ef2abf4a7046bb88d7a8b220ff/GLCanvas.dll +0 -0
  1895. data/Slic3r/Win/lib/vrt/bd26fbb8f6447c2e98cf359976a3c1a7/POSIX.dll +0 -0
  1896. data/Slic3r/Win/lib/vrt/c23df991c561704a8913289bdfea9462/Zlib.dll +0 -0
  1897. data/Slic3r/Win/lib/vrt/c8786c44f0a905ffe6d5d8a4068a75c2/Call.dll +0 -0
  1898. data/Slic3r/Win/lib/vrt/cbbb6d80da8c62ee893a65195943b803/re.dll +0 -0
  1899. data/Slic3r/Win/lib/vrt/cbfee14465f0627fbadfcc84b97d402b/KR.dll +0 -0
  1900. data/Slic3r/Win/lib/vrt/cd0b5b2fa854963191ca9718e26a0abc/Grid.dll +0 -0
  1901. data/Slic3r/Win/lib/vrt/ceb3487499a2d7f0edbcc6aa0c0536c1/NamedCapture.dll +0 -0
  1902. data/Slic3r/Win/lib/vrt/cfbd454ca865af139a419af806f1d4c7/DND.dll +0 -0
  1903. data/Slic3r/Win/lib/vrt/cfcde55111d441748de61cc95acb240e/Check.dll +0 -0
  1904. data/Slic3r/Win/lib/vrt/d0b4c3dceefb5d08dbe60f0e68d0da76/filehandles.dll +0 -0
  1905. data/Slic3r/Win/lib/vrt/d9c3e3943b3f28bc1f09e2f713cc6afb/Glob.dll +0 -0
  1906. data/Slic3r/Win/lib/vrt/da3813f7e06d5ace75632aaf1738303a/Cwd.dll +0 -0
  1907. data/Slic3r/Win/lib/vrt/e29b9764cd99fd442815834972733f63/Encode.dll +0 -0
  1908. data/Slic3r/Win/lib/vrt/e51409fbea61e7f44156de0a7d61ce6e/FastCalc.dll +0 -0
  1909. data/Slic3r/Win/lib/vrt/eaa3f41565bf2fe58068d68f47a06165/Bzip2.dll +0 -0
  1910. data/Slic3r/Win/lib/vrt/eb8576fa2c159886e7f37945c9fb302c/Util.dll +0 -0
  1911. data/Slic3r/Win/lib/vrt/ef0a1b3a50dcc9984703f576320986af/Socket.dll +0 -0
  1912. data/Slic3r/Win/lib/vrt/efa78e66d1d123d9a6f5890b6ca9167a/TW.dll +0 -0
  1913. data/Slic3r/Win/lib/vrt/f490c3f60de8989339da70e91e2faf32/threads.dll +0 -0
  1914. data/Slic3r/Win/lib/vrt/f6025e058c0367c56e8eed568e60077b/Clone.dll +0 -0
  1915. data/Slic3r/Win/lib/vrt/f8d8299b70fb38b8f4ba594e6f23c91f/XS.dll +0 -0
  1916. data/Slic3r/Win/lib/vrt/fa119178d164dcf97f19aecc876231c0/package.lib +0 -0
  1917. data/Slic3r/Win/lib/vrt/fadbe2ebaf950eb9e5e3c3d65739aa92/via.dll +0 -0
  1918. data/Slic3r/Win/lib/vrt/fb078e7d1a272046eb7bd617bd3ed5c4/Wx.dll +0 -0
  1919. data/Slic3r/Win/lib/vrt/ffa8ccc0f7f886ba695e841a491bce9a/XS.dll +0 -0
  1920. data/Slic3r/Win/res/Slic3r.icns +0 -0
  1921. data/Slic3r/Win/res/Slic3r.ico +0 -0
  1922. data/Slic3r/Win/res/Slic3r.png +0 -0
  1923. data/Slic3r/Win/res/Slic3r_128px.png +0 -0
  1924. data/Slic3r/Win/res/Slic3r_192px.png +0 -0
  1925. data/Slic3r/Win/res/Slic3r_192px_transparent.png +0 -0
  1926. data/Slic3r/Win/res/add.png +0 -0
  1927. data/Slic3r/Win/res/arrow_out.png +0 -0
  1928. data/Slic3r/Win/res/arrow_rotate_anticlockwise.png +0 -0
  1929. data/Slic3r/Win/res/arrow_rotate_clockwise.png +0 -0
  1930. data/Slic3r/Win/res/arrow_up.png +0 -0
  1931. data/Slic3r/Win/res/box.png +0 -0
  1932. data/Slic3r/Win/res/brick.png +0 -0
  1933. data/Slic3r/Win/res/brick_add.png +0 -0
  1934. data/Slic3r/Win/res/brick_delete.png +0 -0
  1935. data/Slic3r/Win/res/brick_go.png +0 -0
  1936. data/Slic3r/Win/res/bricks.png +0 -0
  1937. data/Slic3r/Win/res/building.png +0 -0
  1938. data/Slic3r/Win/res/bullet_black.png +0 -0
  1939. data/Slic3r/Win/res/bullet_blue.png +0 -0
  1940. data/Slic3r/Win/res/bullet_white.png +0 -0
  1941. data/Slic3r/Win/res/cog.png +0 -0
  1942. data/Slic3r/Win/res/cog_go.png +0 -0
  1943. data/Slic3r/Win/res/cross.png +0 -0
  1944. data/Slic3r/Win/res/delete.png +0 -0
  1945. data/Slic3r/Win/res/disk.png +0 -0
  1946. data/Slic3r/Win/res/error.png +0 -0
  1947. data/Slic3r/Win/res/funnel.png +0 -0
  1948. data/Slic3r/Win/res/hourglass.png +0 -0
  1949. data/Slic3r/Win/res/layers.png +0 -0
  1950. data/Slic3r/Win/res/note.png +0 -0
  1951. data/Slic3r/Win/res/package.png +0 -0
  1952. data/Slic3r/Win/res/package_green.png +0 -0
  1953. data/Slic3r/Win/res/page_white_go.png +0 -0
  1954. data/Slic3r/Win/res/plugin.png +0 -0
  1955. data/Slic3r/Win/res/printer_empty.png +0 -0
  1956. data/Slic3r/Win/res/shading.png +0 -0
  1957. data/Slic3r/Win/res/shape_ungroup.png +0 -0
  1958. data/Slic3r/Win/res/spool.png +0 -0
  1959. data/Slic3r/Win/res/tag_blue.png +0 -0
  1960. data/Slic3r/Win/res/time.png +0 -0
  1961. data/Slic3r/Win/res/wrench.png +0 -0
  1962. data/Slic3r/Win/slic3r-console.exe +0 -0
  1963. data/Slic3r/Win/slic3r.exe +0 -0
  1964. data/Slic3r/Win/temp.txt +278 -0
  1965. data/lib/STLExtract.rb +155 -0
  1966. data/lib/STLExtract/version.rb +3 -0
  1967. metadata +2044 -0
@@ -0,0 +1,215 @@
1
+ # Copyrights 1995-2012 by Mark Overmeer <perl@overmeer.net>.
2
+ # For other contributors see ChangeLog.
3
+ # See the manual pages for details on the licensing terms.
4
+ # Pod stripped from pm file by OODoc 2.00.
5
+ use strict;
6
+
7
+ package Mail::Mailer;
8
+ use vars '$VERSION';
9
+ $VERSION = '2.09';
10
+
11
+ use base 'IO::Handle';
12
+
13
+ use POSIX qw/_exit/;
14
+
15
+ use Carp;
16
+ use Config;
17
+
18
+
19
+
20
+ sub is_exe($);
21
+
22
+ sub Version { our $VERSION }
23
+
24
+ our @Mailers =
25
+ ( sendmail => '/usr/lib/sendmail;/usr/sbin/sendmail;/usr/ucblib/sendmail'
26
+ , smtp => undef
27
+ , smtps => undef
28
+ , qmail => '/usr/sbin/qmail-inject;/var/qmail/bin/qmail-inject'
29
+ , testfile => undef
30
+ );
31
+
32
+ push @Mailers, map { split /\:/, $_, 2 }
33
+ split /$Config{path_sep}/, $ENV{PERL_MAILERS}
34
+ if $ENV{PERL_MAILERS};
35
+
36
+ our %Mailers = @Mailers;
37
+ our $MailerType;
38
+ our $MailerBinary;
39
+
40
+ # does this really need to be done? or should a default mailer be specfied?
41
+
42
+ $Mailers{sendmail} = 'sendmail'
43
+ if $^O eq 'os2' && ! is_exe $Mailers{sendmail};
44
+
45
+ if($^O =~ m/MacOS|VMS|MSWin|os2|NetWare/i )
46
+ { $MailerType = 'smtp';
47
+ $MailerBinary = $Mailers{$MailerType};
48
+ }
49
+ else
50
+ { for(my $i = 0 ; $i < @Mailers ; $i += 2)
51
+ { $MailerType = $Mailers[$i];
52
+ if(my $binary = is_exe $Mailers{$MailerType})
53
+ { $MailerBinary = $binary;
54
+ last;
55
+ }
56
+ }
57
+ }
58
+
59
+ sub import
60
+ { shift; # class
61
+ @_ or return;
62
+
63
+ my $type = shift;
64
+ my $exe = shift || $Mailers{$type};
65
+
66
+ is_exe $exe
67
+ or carp "Cannot locate '$exe'";
68
+
69
+ $MailerType = $type;
70
+ $Mailers{$MailerType} = $exe;
71
+ }
72
+
73
+ sub to_array($)
74
+ { my ($self, $thing) = @_;
75
+ ref $thing ? @$thing : $thing;
76
+ }
77
+
78
+ sub is_exe($)
79
+ { my $exe = shift || '';
80
+
81
+ foreach my $cmd (split /\;/, $exe)
82
+ { $cmd =~ s/^\s+//;
83
+
84
+ # remove any options
85
+ my $name = ($cmd =~ /^(\S+)/)[0];
86
+
87
+ # check for absolute or relative path
88
+ return $cmd
89
+ if -x $name && ! -d $name && $name =~ m![\\/]!;
90
+
91
+ if(defined $ENV{PATH})
92
+ { foreach my $dir (split /$Config{path_sep}/, $ENV{PATH})
93
+ { return "$dir/$cmd"
94
+ if -x "$dir/$name" && ! -d "$dir/$name";
95
+ }
96
+ }
97
+ }
98
+ 0;
99
+ }
100
+
101
+
102
+ sub new($@)
103
+ { my ($class, $type, @args) = @_;
104
+
105
+ unless($type)
106
+ { $MailerType or croak "No MailerType specified";
107
+
108
+ warn "No real MTA found, using '$MailerType'"
109
+ if $MailerType eq 'testfile';
110
+
111
+ $type = $MailerType;
112
+ }
113
+
114
+ my $exe = $Mailers{$type};
115
+
116
+ if(defined $exe)
117
+ { $exe = is_exe $exe
118
+ if defined $type;
119
+
120
+ $exe ||= $MailerBinary
121
+ or croak "No mailer type specified (and no default available), thus can not find executable program.";
122
+ }
123
+
124
+ $class = "Mail::Mailer::$type";
125
+ eval "require $class" or die $@;
126
+
127
+ my $glob = $class->SUPER::new; # object is a GLOB!
128
+ %{*$glob} = (Exe => $exe, Args => [ @args ]);
129
+ $glob;
130
+ }
131
+
132
+
133
+ sub open($)
134
+ { my ($self, $hdrs) = @_;
135
+ my $exe = *$self->{Exe}; # no exe, then direct smtp
136
+ my $args = *$self->{Args};
137
+
138
+ my @to = $self->who_to($hdrs);
139
+ my $sender = $self->who_sender($hdrs);
140
+
141
+ $self->close; # just in case;
142
+
143
+ if(defined $exe)
144
+ { # Fork and start a mailer
145
+ my $child = open $self, '|-';
146
+ defined $child or die "Failed to send: $!";
147
+
148
+ if($child==0)
149
+ { # Child process will handle sending, but this is not real exec()
150
+ # this is a setup!!!
151
+ unless($self->exec($exe, $args, \@to, $sender))
152
+ { warn $!; # setup failed
153
+ _exit(1); # no DESTROY(), keep it for parent
154
+ }
155
+ }
156
+ }
157
+ else
158
+ { $self->exec($exe, $args, \@to, $sender)
159
+ or die $!;
160
+ }
161
+
162
+ $self->set_headers($hdrs);
163
+ $self;
164
+ }
165
+
166
+ sub _cleanup_hdrs($)
167
+ { foreach my $h (values %{(shift)})
168
+ { foreach (ref $h ? @$h : $h)
169
+ { s/\n\s*/ /g;
170
+ s/\s+$//;
171
+ }
172
+ }
173
+ }
174
+
175
+ sub exec($$$$)
176
+ { my($self, $exe, $args, $to, $sender) = @_;
177
+
178
+ # Fork and exec the mailer (no shell involved to avoid risks)
179
+ my @exe = split /\s+/, $exe;
180
+ exec @exe, @$args, @$to;
181
+ }
182
+
183
+ sub can_cc { 1 } # overridden in subclass for mailer that can't
184
+
185
+ sub who_to($)
186
+ { my($self, $hdrs) = @_;
187
+ my @to = $self->to_array($hdrs->{To});
188
+ unless($self->can_cc) # Can't cc/bcc so add them to @to
189
+ { push @to, $self->to_array($hdrs->{Cc} ) if $hdrs->{Cc};
190
+ push @to, $self->to_array($hdrs->{Bcc}) if $hdrs->{Bcc};
191
+ }
192
+ @to;
193
+ }
194
+
195
+ sub who_sender($)
196
+ { my ($self, $hdrs) = @_;
197
+ ($self->to_array($hdrs->{Sender} || $hdrs->{From}))[0];
198
+ }
199
+
200
+ sub epilogue {
201
+ # This could send a .signature, also see ::smtp subclass
202
+ }
203
+
204
+ sub close(@)
205
+ { my $self = shift;
206
+ fileno $self or return;
207
+
208
+ $self->epilogue;
209
+ CORE::close $self;
210
+ }
211
+
212
+ sub DESTROY { shift->close }
213
+
214
+
215
+ 1;
@@ -0,0 +1,149 @@
1
+ # Copyrights 1995-2012 by Mark Overmeer <perl@overmeer.net>.
2
+ # For other contributors see ChangeLog.
3
+ # See the manual pages for details on the licensing terms.
4
+ # Pod stripped from pm file by OODoc 2.00.
5
+ use strict;
6
+
7
+ package Mail::Util;
8
+ use vars '$VERSION';
9
+ $VERSION = '2.09';
10
+
11
+ use base 'Exporter';
12
+
13
+ our @EXPORT_OK = qw(read_mbox maildomain mailaddress);
14
+
15
+ use Carp;
16
+ sub Version { our $VERSION }
17
+
18
+ my ($domain, $mailaddress);
19
+ my @sendmailcf = qw(/etc /etc/sendmail /etc/ucblib
20
+ /etc/mail /usr/lib /var/adm/sendmail);
21
+
22
+
23
+ sub read_mbox($)
24
+ { my $file = shift;
25
+
26
+ local *FH;
27
+ open FH,'<', $file
28
+ or croak "cannot open '$file': $!\n";
29
+
30
+ local $_;
31
+ my @mbox;
32
+ my $mail = [];
33
+ my $blank = 1;
34
+
35
+ while(<FH>)
36
+ { if($blank && /^From .*\d{4}/)
37
+ { push @mbox, $mail if @$mail;
38
+ $mail = [ $_ ];
39
+ $blank = 0;
40
+ }
41
+ else
42
+ { $blank = m/^$/ ? 1 : 0;
43
+ push @$mail, $_;
44
+ }
45
+ }
46
+
47
+ push @mbox, $mail if @$mail;
48
+ close FH;
49
+
50
+ wantarray ? @mbox : \@mbox;
51
+ }
52
+
53
+
54
+ sub maildomain()
55
+ { return $domain
56
+ if defined $domain;
57
+
58
+ $domain = $ENV{MAILDOMAIN}
59
+ and return $domain;
60
+
61
+ # Try sendmail configuration file
62
+
63
+ my $config = (grep -r, map {"$_/sendmail.cf"} @sendmailcf)[0];
64
+
65
+ local *CF;
66
+ local $_;
67
+ if(defined $config && open CF, '<', $config)
68
+ { my %var;
69
+ while(<CF>)
70
+ { if(my ($v, $arg) = /^D([a-zA-Z])([\w.\$\-]+)/)
71
+ { $arg =~ s/\$([a-zA-Z])/exists $var{$1} ? $var{$1} : '$'.$1/eg;
72
+ $var{$v} = $arg;
73
+ }
74
+ }
75
+ close CF;
76
+ $domain = $var{j} if defined $var{j};
77
+ $domain = $var{M} if defined $var{M};
78
+
79
+ $domain = $1
80
+ if $domain && $domain =~ m/([A-Za-z0-9](?:[\.\-A-Za-z0-9]+))/;
81
+
82
+ return $domain
83
+ if defined $domain && $domain !~ /\$/;
84
+ }
85
+
86
+ # Try smail config file if exists
87
+
88
+ if(open CF, '<', "/usr/lib/smail/config")
89
+ { while(<CF>)
90
+ { if( /\A\s*hostnames?\s*=\s*(\S+)/ )
91
+ { $domain = (split /\:/,$1)[0];
92
+ last;
93
+ }
94
+ }
95
+ close CF;
96
+
97
+ return $domain
98
+ if defined $domain;
99
+ }
100
+
101
+ # Try a SMTP connection to 'mailhost'
102
+
103
+ if(eval {require Net::SMTP})
104
+ { foreach my $host (qw(mailhost localhost))
105
+ { # hosts are local, so short timeout
106
+ my $smtp = eval { Net::SMTP->new($host, Timeout => 5) };
107
+ if(defined $smtp)
108
+ { $domain = $smtp->domain;
109
+ $smtp->quit;
110
+ last;
111
+ }
112
+ }
113
+ }
114
+
115
+ # Use internet(DNS) domain name, if it can be found
116
+ $domain = Net::Domain::domainname()
117
+ if !defined $domain && eval {require Net::Domain};
118
+
119
+ $domain ||= "localhost";
120
+ }
121
+
122
+
123
+ sub mailaddress()
124
+ { return $mailaddress
125
+ if defined $mailaddress;
126
+
127
+ # Get user name from environment
128
+ $mailaddress = $ENV{MAILADDRESS};
129
+
130
+ unless($mailaddress || $^O ne 'MacOS')
131
+ { require Mac::InternetConfig;
132
+
133
+ no strict;
134
+ Mac::InternetConfig->import;
135
+ $mailaddress = $InternetConfig{kICEmail()};
136
+ }
137
+
138
+ $mailaddress ||= $ENV{USER} || $ENV{LOGNAME} || eval {getpwuid $>}
139
+ || "postmaster";
140
+
141
+ # Add domain if it does not exist
142
+ $mailaddress .= '@' . maildomain
143
+ if $mailaddress !~ /\@/;
144
+
145
+ $mailaddress =~ s/(^.*<|>.*$)//g;
146
+ $mailaddress;
147
+ }
148
+
149
+ 1;
@@ -0,0 +1,4493 @@
1
+ package Math::BigFloat;
2
+
3
+ #
4
+ # Mike grinned. 'Two down, infinity to go' - Mike Nostrus in 'Before and After'
5
+ #
6
+
7
+ # The following hash values are internally used:
8
+ # _e : exponent (ref to $CALC object)
9
+ # _m : mantissa (ref to $CALC object)
10
+ # _es : sign of _e
11
+ # sign : +,-,+inf,-inf, or "NaN" if not a number
12
+ # _a : accuracy
13
+ # _p : precision
14
+
15
+ $VERSION = '1.993';
16
+ require 5.006002;
17
+
18
+ require Exporter;
19
+ @ISA = qw/Math::BigInt/;
20
+ @EXPORT_OK = qw/bpi/;
21
+
22
+ use strict;
23
+ # $_trap_inf/$_trap_nan are internal and should never be accessed from outside
24
+ use vars qw/$AUTOLOAD $accuracy $precision $div_scale $round_mode $rnd_mode
25
+ $upgrade $downgrade $_trap_nan $_trap_inf/;
26
+ my $class = "Math::BigFloat";
27
+
28
+ use overload
29
+ '<=>' => sub { my $rc = $_[2] ?
30
+ ref($_[0])->bcmp($_[1],$_[0]) :
31
+ ref($_[0])->bcmp($_[0],$_[1]);
32
+ $rc = 1 unless defined $rc;
33
+ $rc <=> 0;
34
+ },
35
+ # we need '>=' to get things like "1 >= NaN" right:
36
+ '>=' => sub { my $rc = $_[2] ?
37
+ ref($_[0])->bcmp($_[1],$_[0]) :
38
+ ref($_[0])->bcmp($_[0],$_[1]);
39
+ # if there was a NaN involved, return false
40
+ return '' unless defined $rc;
41
+ $rc >= 0;
42
+ },
43
+ 'int' => sub { $_[0]->as_number() }, # 'trunc' to bigint
44
+ ;
45
+
46
+ ##############################################################################
47
+ # global constants, flags and assorted stuff
48
+
49
+ # the following are public, but their usage is not recommended. Use the
50
+ # accessor methods instead.
51
+
52
+ # class constants, use Class->constant_name() to access
53
+ # one of 'even', 'odd', '+inf', '-inf', 'zero', 'trunc' or 'common'
54
+ $round_mode = 'even';
55
+ $accuracy = undef;
56
+ $precision = undef;
57
+ $div_scale = 40;
58
+
59
+ $upgrade = undef;
60
+ $downgrade = undef;
61
+ # the package we are using for our private parts, defaults to:
62
+ # Math::BigInt->config()->{lib}
63
+ my $MBI = 'Math::BigInt::Calc';
64
+
65
+ # are NaNs ok? (otherwise it dies when encountering an NaN) set w/ config()
66
+ $_trap_nan = 0;
67
+ # the same for infinity
68
+ $_trap_inf = 0;
69
+
70
+ # constant for easier life
71
+ my $nan = 'NaN';
72
+
73
+ my $IMPORT = 0; # was import() called yet? used to make require work
74
+
75
+ # some digits of accuracy for blog(undef,10); which we use in blog() for speed
76
+ my $LOG_10 =
77
+ '2.3025850929940456840179914546843642076011014886287729760333279009675726097';
78
+ my $LOG_10_A = length($LOG_10)-1;
79
+ # ditto for log(2)
80
+ my $LOG_2 =
81
+ '0.6931471805599453094172321214581765680755001343602552541206800094933936220';
82
+ my $LOG_2_A = length($LOG_2)-1;
83
+ my $HALF = '0.5'; # made into an object if nec.
84
+
85
+ ##############################################################################
86
+ # the old code had $rnd_mode, so we need to support it, too
87
+
88
+ sub TIESCALAR { my ($class) = @_; bless \$round_mode, $class; }
89
+ sub FETCH { return $round_mode; }
90
+ sub STORE { $rnd_mode = $_[0]->round_mode($_[1]); }
91
+
92
+ BEGIN
93
+ {
94
+ # when someone sets $rnd_mode, we catch this and check the value to see
95
+ # whether it is valid or not.
96
+ $rnd_mode = 'even'; tie $rnd_mode, 'Math::BigFloat';
97
+
98
+ # we need both of them in this package:
99
+ *as_int = \&as_number;
100
+ }
101
+
102
+ ##############################################################################
103
+
104
+ {
105
+ # valid method aliases for AUTOLOAD
106
+ my %methods = map { $_ => 1 }
107
+ qw / fadd fsub fmul fdiv fround ffround fsqrt fmod fstr fsstr fpow fnorm
108
+ fint facmp fcmp fzero fnan finf finc fdec ffac fneg
109
+ fceil ffloor frsft flsft fone flog froot fexp
110
+ /;
111
+ # valid methods that can be handed up (for AUTOLOAD)
112
+ my %hand_ups = map { $_ => 1 }
113
+ qw / is_nan is_inf is_negative is_positive is_pos is_neg
114
+ accuracy precision div_scale round_mode fabs fnot
115
+ objectify upgrade downgrade
116
+ bone binf bnan bzero
117
+ bsub
118
+ /;
119
+
120
+ sub _method_alias { exists $methods{$_[0]||''}; }
121
+ sub _method_hand_up { exists $hand_ups{$_[0]||''}; }
122
+ }
123
+
124
+ ##############################################################################
125
+ # constructors
126
+
127
+ sub new
128
+ {
129
+ # create a new BigFloat object from a string or another bigfloat object.
130
+ # _e: exponent
131
+ # _m: mantissa
132
+ # sign => sign (+/-), or "NaN"
133
+
134
+ my ($class,$wanted,@r) = @_;
135
+
136
+ # avoid numify-calls by not using || on $wanted!
137
+ return $class->bzero() if !defined $wanted; # default to 0
138
+ return $wanted->copy() if UNIVERSAL::isa($wanted,'Math::BigFloat');
139
+
140
+ $class->import() if $IMPORT == 0; # make require work
141
+
142
+ my $self = {}; bless $self, $class;
143
+ # shortcut for bigints and its subclasses
144
+ if ((ref($wanted)) && UNIVERSAL::can( $wanted, "as_number"))
145
+ {
146
+ $self->{_m} = $wanted->as_number()->{value}; # get us a bigint copy
147
+ $self->{_e} = $MBI->_zero();
148
+ $self->{_es} = '+';
149
+ $self->{sign} = $wanted->sign();
150
+ return $self->bnorm();
151
+ }
152
+ # else: got a string or something masquerading as number (with overload)
153
+
154
+ # handle '+inf', '-inf' first
155
+ if ($wanted =~ /^[+-]?inf\z/)
156
+ {
157
+ return $downgrade->new($wanted) if $downgrade;
158
+
159
+ $self->{sign} = $wanted; # set a default sign for bstr()
160
+ return $self->binf($wanted);
161
+ }
162
+
163
+ # shortcut for simple forms like '12' that neither have trailing nor leading
164
+ # zeros
165
+ if ($wanted =~ /^([+-]?)([1-9][0-9]*[1-9])$/)
166
+ {
167
+ $self->{_e} = $MBI->_zero();
168
+ $self->{_es} = '+';
169
+ $self->{sign} = $1 || '+';
170
+ $self->{_m} = $MBI->_new($2);
171
+ return $self->round(@r) if !$downgrade;
172
+ }
173
+
174
+ my ($mis,$miv,$mfv,$es,$ev) = Math::BigInt::_split($wanted);
175
+ if (!ref $mis)
176
+ {
177
+ if ($_trap_nan)
178
+ {
179
+ require Carp;
180
+ Carp::croak ("$wanted is not a number initialized to $class");
181
+ }
182
+
183
+ return $downgrade->bnan() if $downgrade;
184
+
185
+ $self->{_e} = $MBI->_zero();
186
+ $self->{_es} = '+';
187
+ $self->{_m} = $MBI->_zero();
188
+ $self->{sign} = $nan;
189
+ }
190
+ else
191
+ {
192
+ # make integer from mantissa by adjusting exp, then convert to int
193
+ $self->{_e} = $MBI->_new($$ev); # exponent
194
+ $self->{_es} = $$es || '+';
195
+ my $mantissa = "$$miv$$mfv"; # create mant.
196
+ $mantissa =~ s/^0+(\d)/$1/; # strip leading zeros
197
+ $self->{_m} = $MBI->_new($mantissa); # create mant.
198
+
199
+ # 3.123E0 = 3123E-3, and 3.123E-2 => 3123E-5
200
+ if (CORE::length($$mfv) != 0)
201
+ {
202
+ my $len = $MBI->_new( CORE::length($$mfv));
203
+ ($self->{_e}, $self->{_es}) =
204
+ _e_sub ($self->{_e}, $len, $self->{_es}, '+');
205
+ }
206
+ # we can only have trailing zeros on the mantissa if $$mfv eq ''
207
+ else
208
+ {
209
+ # Use a regexp to count the trailing zeros in $$miv instead of _zeros()
210
+ # because that is faster, especially when _m is not stored in base 10.
211
+ my $zeros = 0; $zeros = CORE::length($1) if $$miv =~ /[1-9](0*)$/;
212
+ if ($zeros != 0)
213
+ {
214
+ my $z = $MBI->_new($zeros);
215
+ # turn '120e2' into '12e3'
216
+ $MBI->_rsft ( $self->{_m}, $z, 10);
217
+ ($self->{_e}, $self->{_es}) =
218
+ _e_add ( $self->{_e}, $z, $self->{_es}, '+');
219
+ }
220
+ }
221
+ $self->{sign} = $$mis;
222
+
223
+ # for something like 0Ey, set y to 1, and -0 => +0
224
+ # Check $$miv for being '0' and $$mfv eq '', because otherwise _m could not
225
+ # have become 0. That's faster than to call $MBI->_is_zero().
226
+ $self->{sign} = '+', $self->{_e} = $MBI->_one()
227
+ if $$miv eq '0' and $$mfv eq '';
228
+
229
+ return $self->round(@r) if !$downgrade;
230
+ }
231
+ # if downgrade, inf, NaN or integers go down
232
+
233
+ if ($downgrade && $self->{_es} eq '+')
234
+ {
235
+ if ($MBI->_is_zero( $self->{_e} ))
236
+ {
237
+ return $downgrade->new($$mis . $MBI->_str( $self->{_m} ));
238
+ }
239
+ return $downgrade->new($self->bsstr());
240
+ }
241
+ $self->bnorm()->round(@r); # first normalize, then round
242
+ }
243
+
244
+ sub copy
245
+ {
246
+ # if two arguments, the first one is the class to "swallow" subclasses
247
+ if (@_ > 1)
248
+ {
249
+ my $self = bless {
250
+ sign => $_[1]->{sign},
251
+ _es => $_[1]->{_es},
252
+ _m => $MBI->_copy($_[1]->{_m}),
253
+ _e => $MBI->_copy($_[1]->{_e}),
254
+ }, $_[0] if @_ > 1;
255
+
256
+ $self->{_a} = $_[1]->{_a} if defined $_[1]->{_a};
257
+ $self->{_p} = $_[1]->{_p} if defined $_[1]->{_p};
258
+ return $self;
259
+ }
260
+
261
+ my $self = bless {
262
+ sign => $_[0]->{sign},
263
+ _es => $_[0]->{_es},
264
+ _m => $MBI->_copy($_[0]->{_m}),
265
+ _e => $MBI->_copy($_[0]->{_e}),
266
+ }, ref($_[0]);
267
+
268
+ $self->{_a} = $_[0]->{_a} if defined $_[0]->{_a};
269
+ $self->{_p} = $_[0]->{_p} if defined $_[0]->{_p};
270
+ $self;
271
+ }
272
+
273
+ sub _bnan
274
+ {
275
+ # used by parent class bone() to initialize number to NaN
276
+ my $self = shift;
277
+
278
+ if ($_trap_nan)
279
+ {
280
+ require Carp;
281
+ my $class = ref($self);
282
+ Carp::croak ("Tried to set $self to NaN in $class\::_bnan()");
283
+ }
284
+
285
+ $IMPORT=1; # call our import only once
286
+ $self->{_m} = $MBI->_zero();
287
+ $self->{_e} = $MBI->_zero();
288
+ $self->{_es} = '+';
289
+ }
290
+
291
+ sub _binf
292
+ {
293
+ # used by parent class bone() to initialize number to +-inf
294
+ my $self = shift;
295
+
296
+ if ($_trap_inf)
297
+ {
298
+ require Carp;
299
+ my $class = ref($self);
300
+ Carp::croak ("Tried to set $self to +-inf in $class\::_binf()");
301
+ }
302
+
303
+ $IMPORT=1; # call our import only once
304
+ $self->{_m} = $MBI->_zero();
305
+ $self->{_e} = $MBI->_zero();
306
+ $self->{_es} = '+';
307
+ }
308
+
309
+ sub _bone
310
+ {
311
+ # used by parent class bone() to initialize number to 1
312
+ my $self = shift;
313
+ $IMPORT=1; # call our import only once
314
+ $self->{_m} = $MBI->_one();
315
+ $self->{_e} = $MBI->_zero();
316
+ $self->{_es} = '+';
317
+ }
318
+
319
+ sub _bzero
320
+ {
321
+ # used by parent class bone() to initialize number to 0
322
+ my $self = shift;
323
+ $IMPORT=1; # call our import only once
324
+ $self->{_m} = $MBI->_zero();
325
+ $self->{_e} = $MBI->_one();
326
+ $self->{_es} = '+';
327
+ }
328
+
329
+ sub isa
330
+ {
331
+ my ($self,$class) = @_;
332
+ return if $class =~ /^Math::BigInt/; # we aren't one of these
333
+ UNIVERSAL::isa($self,$class);
334
+ }
335
+
336
+ sub config
337
+ {
338
+ # return (later set?) configuration data as hash ref
339
+ my $class = shift || 'Math::BigFloat';
340
+
341
+ if (@_ == 1 && ref($_[0]) ne 'HASH')
342
+ {
343
+ my $cfg = $class->SUPER::config();
344
+ return $cfg->{$_[0]};
345
+ }
346
+
347
+ my $cfg = $class->SUPER::config(@_);
348
+
349
+ # now we need only to override the ones that are different from our parent
350
+ $cfg->{class} = $class;
351
+ $cfg->{with} = $MBI;
352
+ $cfg;
353
+ }
354
+
355
+ ##############################################################################
356
+ # string conversion
357
+
358
+ sub bstr
359
+ {
360
+ # (ref to BFLOAT or num_str ) return num_str
361
+ # Convert number from internal format to (non-scientific) string format.
362
+ # internal format is always normalized (no leading zeros, "-0" => "+0")
363
+ my ($self,$x) = ref($_[0]) ? (undef,$_[0]) : objectify(1,@_);
364
+
365
+ if ($x->{sign} !~ /^[+-]$/)
366
+ {
367
+ return $x->{sign} unless $x->{sign} eq '+inf'; # -inf, NaN
368
+ return 'inf'; # +inf
369
+ }
370
+
371
+ my $es = '0'; my $len = 1; my $cad = 0; my $dot = '.';
372
+
373
+ # $x is zero?
374
+ my $not_zero = !($x->{sign} eq '+' && $MBI->_is_zero($x->{_m}));
375
+ if ($not_zero)
376
+ {
377
+ $es = $MBI->_str($x->{_m});
378
+ $len = CORE::length($es);
379
+ my $e = $MBI->_num($x->{_e});
380
+ $e = -$e if $x->{_es} eq '-';
381
+ if ($e < 0)
382
+ {
383
+ $dot = '';
384
+ # if _e is bigger than a scalar, the following will blow your memory
385
+ if ($e <= -$len)
386
+ {
387
+ my $r = abs($e) - $len;
388
+ $es = '0.'. ('0' x $r) . $es; $cad = -($len+$r);
389
+ }
390
+ else
391
+ {
392
+ substr($es,$e,0) = '.'; $cad = $MBI->_num($x->{_e});
393
+ $cad = -$cad if $x->{_es} eq '-';
394
+ }
395
+ }
396
+ elsif ($e > 0)
397
+ {
398
+ # expand with zeros
399
+ $es .= '0' x $e; $len += $e; $cad = 0;
400
+ }
401
+ } # if not zero
402
+
403
+ $es = '-'.$es if $x->{sign} eq '-';
404
+ # if set accuracy or precision, pad with zeros on the right side
405
+ if ((defined $x->{_a}) && ($not_zero))
406
+ {
407
+ # 123400 => 6, 0.1234 => 4, 0.001234 => 4
408
+ my $zeros = $x->{_a} - $cad; # cad == 0 => 12340
409
+ $zeros = $x->{_a} - $len if $cad != $len;
410
+ $es .= $dot.'0' x $zeros if $zeros > 0;
411
+ }
412
+ elsif ((($x->{_p} || 0) < 0))
413
+ {
414
+ # 123400 => 6, 0.1234 => 4, 0.001234 => 6
415
+ my $zeros = -$x->{_p} + $cad;
416
+ $es .= $dot.'0' x $zeros if $zeros > 0;
417
+ }
418
+ $es;
419
+ }
420
+
421
+ sub bsstr
422
+ {
423
+ # (ref to BFLOAT or num_str ) return num_str
424
+ # Convert number from internal format to scientific string format.
425
+ # internal format is always normalized (no leading zeros, "-0E0" => "+0E0")
426
+ my ($self,$x) = ref($_[0]) ? (undef,$_[0]) : objectify(1,@_);
427
+
428
+ if ($x->{sign} !~ /^[+-]$/)
429
+ {
430
+ return $x->{sign} unless $x->{sign} eq '+inf'; # -inf, NaN
431
+ return 'inf'; # +inf
432
+ }
433
+ my $sep = 'e'.$x->{_es};
434
+ my $sign = $x->{sign}; $sign = '' if $sign eq '+';
435
+ $sign . $MBI->_str($x->{_m}) . $sep . $MBI->_str($x->{_e});
436
+ }
437
+
438
+ sub numify
439
+ {
440
+ # Make a number from a BigFloat object
441
+ # simple return a string and let Perl's atoi()/atof() handle the rest
442
+ my ($self,$x) = ref($_[0]) ? (undef,$_[0]) : objectify(1,@_);
443
+ $x->bsstr();
444
+ }
445
+
446
+ ##############################################################################
447
+ # public stuff (usually prefixed with "b")
448
+
449
+ sub bneg
450
+ {
451
+ # (BINT or num_str) return BINT
452
+ # negate number or make a negated number from string
453
+ my ($self,$x) = ref($_[0]) ? (undef,$_[0]) : objectify(1,@_);
454
+
455
+ return $x if $x->modify('bneg');
456
+
457
+ # for +0 dont negate (to have always normalized +0). Does nothing for 'NaN'
458
+ $x->{sign} =~ tr/+-/-+/ unless ($x->{sign} eq '+' && $MBI->_is_zero($x->{_m}));
459
+ $x;
460
+ }
461
+
462
+ # tels 2001-08-04
463
+ # XXX TODO this must be overwritten and return NaN for non-integer values
464
+ # band(), bior(), bxor(), too
465
+ #sub bnot
466
+ # {
467
+ # $class->SUPER::bnot($class,@_);
468
+ # }
469
+
470
+ sub bcmp
471
+ {
472
+ # Compares 2 values. Returns one of undef, <0, =0, >0. (suitable for sort)
473
+
474
+ # set up parameters
475
+ my ($self,$x,$y) = (ref($_[0]),@_);
476
+
477
+ # objectify is costly, so avoid it
478
+ if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1])))
479
+ {
480
+ ($self,$x,$y) = objectify(2,@_);
481
+ }
482
+
483
+ return $upgrade->bcmp($x,$y) if defined $upgrade &&
484
+ ((!$x->isa($self)) || (!$y->isa($self)));
485
+
486
+ # Handle all 'nan' cases.
487
+
488
+ return undef if ($x->{sign} eq $nan) || ($y->{sign} eq $nan);
489
+
490
+ # Handle all '+inf' and '-inf' cases.
491
+
492
+ return 0 if ($x->{sign} eq '+inf' && $y->{sign} eq '+inf' ||
493
+ $x->{sign} eq '-inf' && $y->{sign} eq '-inf');
494
+ return +1 if $x->{sign} eq '+inf'; # x = +inf and y < +inf
495
+ return -1 if $x->{sign} eq '-inf'; # x = -inf and y > -inf
496
+ return -1 if $y->{sign} eq '+inf'; # x < +inf and y = +inf
497
+ return +1 if $y->{sign} eq '-inf'; # x > -inf and y = -inf
498
+
499
+ # Handle all cases with opposite signs.
500
+
501
+ return +1 if $x->{sign} eq '+' && $y->{sign} eq '-'; # also does 0 <=> -y
502
+ return -1 if $x->{sign} eq '-' && $y->{sign} eq '+'; # also does -x <=> 0
503
+
504
+ # Handle all remaining zero cases.
505
+
506
+ my $xz = $x->is_zero();
507
+ my $yz = $y->is_zero();
508
+ return 0 if $xz && $yz; # 0 <=> 0
509
+ return -1 if $xz && $y->{sign} eq '+'; # 0 <=> +y
510
+ return +1 if $yz && $x->{sign} eq '+'; # +x <=> 0
511
+
512
+ # Both arguments are now finite, non-zero numbers with the same sign.
513
+
514
+ my $cmp;
515
+
516
+ # The next step is to compare the exponents, but since each mantissa is an
517
+ # integer of arbitrary value, the exponents must be normalized by the length
518
+ # of the mantissas before we can compare them.
519
+
520
+ my $mxl = $MBI->_len($x->{_m});
521
+ my $myl = $MBI->_len($y->{_m});
522
+
523
+ # If the mantissas have the same length, there is no point in normalizing the
524
+ # exponents by the length of the mantissas, so treat that as a special case.
525
+
526
+ if ($mxl == $myl) {
527
+
528
+ # First handle the two cases where the exponents have different signs.
529
+
530
+ if ($x->{_es} eq '+' && $y->{_es} eq '-') {
531
+ $cmp = +1;
532
+ }
533
+
534
+ elsif ($x->{_es} eq '-' && $y->{_es} eq '+') {
535
+ $cmp = -1;
536
+ }
537
+
538
+ # Then handle the case where the exponents have the same sign.
539
+
540
+ else {
541
+ $cmp = $MBI->_acmp($x->{_e}, $y->{_e});
542
+ $cmp = -$cmp if $x->{_es} eq '-';
543
+ }
544
+
545
+ # Adjust for the sign, which is the same for x and y, and bail out if
546
+ # we're done.
547
+
548
+ $cmp = -$cmp if $x->{sign} eq '-'; # 124 > 123, but -124 < -123
549
+ return $cmp if $cmp;
550
+
551
+ }
552
+
553
+ # We must normalize each exponent by the length of the corresponding
554
+ # mantissa. Life is a lot easier if we first make both exponents
555
+ # non-negative. We do this by adding the same positive value to both
556
+ # exponent. This is safe, because when comparing the exponents, only the
557
+ # relative difference is important.
558
+
559
+ my $ex;
560
+ my $ey;
561
+
562
+ if ($x->{_es} eq '+') {
563
+
564
+ # If the exponent of x is >= 0 and the exponent of y is >= 0, there is no
565
+ # need to do anything special.
566
+
567
+ if ($y->{_es} eq '+') {
568
+ $ex = $MBI->_copy($x->{_e});
569
+ $ey = $MBI->_copy($y->{_e});
570
+ }
571
+
572
+ # If the exponent of x is >= 0 and the exponent of y is < 0, add the
573
+ # absolute value of the exponent of y to both.
574
+
575
+ else {
576
+ $ex = $MBI->_copy($x->{_e});
577
+ $ex = $MBI->_add($ex, $y->{_e}); # ex + |ey|
578
+ $ey = $MBI->_zero(); # -ex + |ey| = 0
579
+ }
580
+
581
+ } else {
582
+
583
+ # If the exponent of x is < 0 and the exponent of y is >= 0, add the
584
+ # absolute value of the exponent of x to both.
585
+
586
+ if ($y->{_es} eq '+') {
587
+ $ex = $MBI->_zero(); # -ex + |ex| = 0
588
+ $ey = $MBI->_copy($y->{_e});
589
+ $ey = $MBI->_add($ey, $x->{_e}); # ey + |ex|
590
+ }
591
+
592
+ # If the exponent of x is < 0 and the exponent of y is < 0, add the
593
+ # absolute values of both exponents to both exponents.
594
+
595
+ else {
596
+ $ex = $MBI->_copy($y->{_e}); # -ex + |ey| + |ex| = |ey|
597
+ $ey = $MBI->_copy($x->{_e}); # -ey + |ex| + |ey| = |ex|
598
+ }
599
+
600
+ }
601
+
602
+ # Now we can normalize the exponents by adding lengths of the mantissas.
603
+
604
+ $MBI->_add($ex, $MBI->_new($mxl));
605
+ $MBI->_add($ey, $MBI->_new($myl));
606
+
607
+ # We're done if the exponents are different.
608
+
609
+ $cmp = $MBI->_acmp($ex, $ey);
610
+ $cmp = -$cmp if $x->{sign} eq '-'; # 124 > 123, but -124 < -123
611
+ return $cmp if $cmp;
612
+
613
+ # Compare the mantissas, but first normalize them by padding the shorter
614
+ # mantissa with zeros (shift left) until it has the same length as the longer
615
+ # mantissa.
616
+
617
+ my $mx = $x->{_m};
618
+ my $my = $y->{_m};
619
+
620
+ if ($mxl > $myl) {
621
+ $my = $MBI->_lsft($MBI->_copy($my), $MBI->_new($mxl - $myl), 10);
622
+ } elsif ($mxl < $myl) {
623
+ $mx = $MBI->_lsft($MBI->_copy($mx), $MBI->_new($myl - $mxl), 10);
624
+ }
625
+
626
+ $cmp = $MBI->_acmp($mx, $my);
627
+ $cmp = -$cmp if $x->{sign} eq '-'; # 124 > 123, but -124 < -123
628
+ return $cmp;
629
+
630
+ }
631
+
632
+ sub bacmp
633
+ {
634
+ # Compares 2 values, ignoring their signs.
635
+ # Returns one of undef, <0, =0, >0. (suitable for sort)
636
+
637
+ # set up parameters
638
+ my ($self,$x,$y) = (ref($_[0]),@_);
639
+ # objectify is costly, so avoid it
640
+ if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1])))
641
+ {
642
+ ($self,$x,$y) = objectify(2,@_);
643
+ }
644
+
645
+ return $upgrade->bacmp($x,$y) if defined $upgrade &&
646
+ ((!$x->isa($self)) || (!$y->isa($self)));
647
+
648
+ # handle +-inf and NaN's
649
+ if ($x->{sign} !~ /^[+-]$/ || $y->{sign} !~ /^[+-]$/)
650
+ {
651
+ return undef if (($x->{sign} eq $nan) || ($y->{sign} eq $nan));
652
+ return 0 if ($x->is_inf() && $y->is_inf());
653
+ return 1 if ($x->is_inf() && !$y->is_inf());
654
+ return -1;
655
+ }
656
+
657
+ # shortcut
658
+ my $xz = $x->is_zero();
659
+ my $yz = $y->is_zero();
660
+ return 0 if $xz && $yz; # 0 <=> 0
661
+ return -1 if $xz && !$yz; # 0 <=> +y
662
+ return 1 if $yz && !$xz; # +x <=> 0
663
+
664
+ # adjust so that exponents are equal
665
+ my $lxm = $MBI->_len($x->{_m});
666
+ my $lym = $MBI->_len($y->{_m});
667
+ my ($xes,$yes) = (1,1);
668
+ $xes = -1 if $x->{_es} ne '+';
669
+ $yes = -1 if $y->{_es} ne '+';
670
+ # the numify somewhat limits our length, but makes it much faster
671
+ my $lx = $lxm + $xes * $MBI->_num($x->{_e});
672
+ my $ly = $lym + $yes * $MBI->_num($y->{_e});
673
+ my $l = $lx - $ly;
674
+ return $l <=> 0 if $l != 0;
675
+
676
+ # lengths (corrected by exponent) are equal
677
+ # so make mantissa equal-length by padding with zero (shift left)
678
+ my $diff = $lxm - $lym;
679
+ my $xm = $x->{_m}; # not yet copy it
680
+ my $ym = $y->{_m};
681
+ if ($diff > 0)
682
+ {
683
+ $ym = $MBI->_copy($y->{_m});
684
+ $ym = $MBI->_lsft($ym, $MBI->_new($diff), 10);
685
+ }
686
+ elsif ($diff < 0)
687
+ {
688
+ $xm = $MBI->_copy($x->{_m});
689
+ $xm = $MBI->_lsft($xm, $MBI->_new(-$diff), 10);
690
+ }
691
+ $MBI->_acmp($xm,$ym);
692
+ }
693
+
694
+ sub badd
695
+ {
696
+ # add second arg (BFLOAT or string) to first (BFLOAT) (modifies first)
697
+ # return result as BFLOAT
698
+
699
+ # set up parameters
700
+ my ($self,$x,$y,@r) = (ref($_[0]),@_);
701
+ # objectify is costly, so avoid it
702
+ if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1])))
703
+ {
704
+ ($self,$x,$y,@r) = objectify(2,@_);
705
+ }
706
+
707
+ return $x if $x->modify('badd');
708
+
709
+ # inf and NaN handling
710
+ if (($x->{sign} !~ /^[+-]$/) || ($y->{sign} !~ /^[+-]$/))
711
+ {
712
+ # NaN first
713
+ return $x->bnan() if (($x->{sign} eq $nan) || ($y->{sign} eq $nan));
714
+ # inf handling
715
+ if (($x->{sign} =~ /^[+-]inf$/) && ($y->{sign} =~ /^[+-]inf$/))
716
+ {
717
+ # +inf++inf or -inf+-inf => same, rest is NaN
718
+ return $x if $x->{sign} eq $y->{sign};
719
+ return $x->bnan();
720
+ }
721
+ # +-inf + something => +inf; something +-inf => +-inf
722
+ $x->{sign} = $y->{sign}, return $x if $y->{sign} =~ /^[+-]inf$/;
723
+ return $x;
724
+ }
725
+
726
+ return $upgrade->badd($x,$y,@r) if defined $upgrade &&
727
+ ((!$x->isa($self)) || (!$y->isa($self)));
728
+
729
+ $r[3] = $y; # no push!
730
+
731
+ # speed: no add for 0+y or x+0
732
+ return $x->bround(@r) if $y->is_zero(); # x+0
733
+ if ($x->is_zero()) # 0+y
734
+ {
735
+ # make copy, clobbering up x (modify in place!)
736
+ $x->{_e} = $MBI->_copy($y->{_e});
737
+ $x->{_es} = $y->{_es};
738
+ $x->{_m} = $MBI->_copy($y->{_m});
739
+ $x->{sign} = $y->{sign} || $nan;
740
+ return $x->round(@r);
741
+ }
742
+
743
+ # take lower of the two e's and adapt m1 to it to match m2
744
+ my $e = $y->{_e};
745
+ $e = $MBI->_zero() if !defined $e; # if no BFLOAT?
746
+ $e = $MBI->_copy($e); # make copy (didn't do it yet)
747
+
748
+ my $es;
749
+
750
+ ($e,$es) = _e_sub($e, $x->{_e}, $y->{_es} || '+', $x->{_es});
751
+
752
+ my $add = $MBI->_copy($y->{_m});
753
+
754
+ if ($es eq '-') # < 0
755
+ {
756
+ $MBI->_lsft( $x->{_m}, $e, 10);
757
+ ($x->{_e},$x->{_es}) = _e_add($x->{_e}, $e, $x->{_es}, $es);
758
+ }
759
+ elsif (!$MBI->_is_zero($e)) # > 0
760
+ {
761
+ $MBI->_lsft($add, $e, 10);
762
+ }
763
+ # else: both e are the same, so just leave them
764
+
765
+ if ($x->{sign} eq $y->{sign})
766
+ {
767
+ # add
768
+ $x->{_m} = $MBI->_add($x->{_m}, $add);
769
+ }
770
+ else
771
+ {
772
+ ($x->{_m}, $x->{sign}) =
773
+ _e_add($x->{_m}, $add, $x->{sign}, $y->{sign});
774
+ }
775
+
776
+ # delete trailing zeros, then round
777
+ $x->bnorm()->round(@r);
778
+ }
779
+
780
+ # sub bsub is inherited from Math::BigInt!
781
+
782
+ sub binc
783
+ {
784
+ # increment arg by one
785
+ my ($self,$x,@r) = ref($_[0]) ? (ref($_[0]),@_) : objectify(1,@_);
786
+
787
+ return $x if $x->modify('binc');
788
+
789
+ if ($x->{_es} eq '-')
790
+ {
791
+ return $x->badd($self->bone(),@r); # digits after dot
792
+ }
793
+
794
+ if (!$MBI->_is_zero($x->{_e})) # _e == 0 for NaN, inf, -inf
795
+ {
796
+ # 1e2 => 100, so after the shift below _m has a '0' as last digit
797
+ $x->{_m} = $MBI->_lsft($x->{_m}, $x->{_e},10); # 1e2 => 100
798
+ $x->{_e} = $MBI->_zero(); # normalize
799
+ $x->{_es} = '+';
800
+ # we know that the last digit of $x will be '1' or '9', depending on the
801
+ # sign
802
+ }
803
+ # now $x->{_e} == 0
804
+ if ($x->{sign} eq '+')
805
+ {
806
+ $MBI->_inc($x->{_m});
807
+ return $x->bnorm()->bround(@r);
808
+ }
809
+ elsif ($x->{sign} eq '-')
810
+ {
811
+ $MBI->_dec($x->{_m});
812
+ $x->{sign} = '+' if $MBI->_is_zero($x->{_m}); # -1 +1 => -0 => +0
813
+ return $x->bnorm()->bround(@r);
814
+ }
815
+ # inf, nan handling etc
816
+ $x->badd($self->bone(),@r); # badd() does round
817
+ }
818
+
819
+ sub bdec
820
+ {
821
+ # decrement arg by one
822
+ my ($self,$x,@r) = ref($_[0]) ? (ref($_[0]),@_) : objectify(1,@_);
823
+
824
+ return $x if $x->modify('bdec');
825
+
826
+ if ($x->{_es} eq '-')
827
+ {
828
+ return $x->badd($self->bone('-'),@r); # digits after dot
829
+ }
830
+
831
+ if (!$MBI->_is_zero($x->{_e}))
832
+ {
833
+ $x->{_m} = $MBI->_lsft($x->{_m}, $x->{_e},10); # 1e2 => 100
834
+ $x->{_e} = $MBI->_zero(); # normalize
835
+ $x->{_es} = '+';
836
+ }
837
+ # now $x->{_e} == 0
838
+ my $zero = $x->is_zero();
839
+ # <= 0
840
+ if (($x->{sign} eq '-') || $zero)
841
+ {
842
+ $MBI->_inc($x->{_m});
843
+ $x->{sign} = '-' if $zero; # 0 => 1 => -1
844
+ $x->{sign} = '+' if $MBI->_is_zero($x->{_m}); # -1 +1 => -0 => +0
845
+ return $x->bnorm()->round(@r);
846
+ }
847
+ # > 0
848
+ elsif ($x->{sign} eq '+')
849
+ {
850
+ $MBI->_dec($x->{_m});
851
+ return $x->bnorm()->round(@r);
852
+ }
853
+ # inf, nan handling etc
854
+ $x->badd($self->bone('-'),@r); # does round
855
+ }
856
+
857
+ sub DEBUG () { 0; }
858
+
859
+ sub blog
860
+ {
861
+ my ($self,$x,$base,$a,$p,$r) = ref($_[0]) ? (ref($_[0]),@_) : objectify(1,@_);
862
+
863
+ return $x if $x->modify('blog');
864
+
865
+ # $base > 0, $base != 1; if $base == undef default to $base == e
866
+ # $x >= 0
867
+
868
+ # we need to limit the accuracy to protect against overflow
869
+ my $fallback = 0;
870
+ my ($scale,@params);
871
+ ($x,@params) = $x->_find_round_parameters($a,$p,$r);
872
+
873
+ # also takes care of the "error in _find_round_parameters?" case
874
+ return $x->bnan() if $x->{sign} ne '+' || $x->is_zero();
875
+
876
+ # no rounding at all, so must use fallback
877
+ if (scalar @params == 0)
878
+ {
879
+ # simulate old behaviour
880
+ $params[0] = $self->div_scale(); # and round to it as accuracy
881
+ $params[1] = undef; # P = undef
882
+ $scale = $params[0]+4; # at least four more for proper round
883
+ $params[2] = $r; # round mode by caller or undef
884
+ $fallback = 1; # to clear a/p afterwards
885
+ }
886
+ else
887
+ {
888
+ # the 4 below is empirical, and there might be cases where it is not
889
+ # enough...
890
+ $scale = abs($params[0] || $params[1]) + 4; # take whatever is defined
891
+ }
892
+
893
+ return $x->bzero(@params) if $x->is_one();
894
+ # base not defined => base == Euler's number e
895
+ if (defined $base)
896
+ {
897
+ # make object, since we don't feed it through objectify() to still get the
898
+ # case of $base == undef
899
+ $base = $self->new($base) unless ref($base);
900
+ # $base > 0; $base != 1
901
+ return $x->bnan() if $base->is_zero() || $base->is_one() ||
902
+ $base->{sign} ne '+';
903
+ # if $x == $base, we know the result must be 1.0
904
+ if ($x->bcmp($base) == 0)
905
+ {
906
+ $x->bone('+',@params);
907
+ if ($fallback)
908
+ {
909
+ # clear a/p after round, since user did not request it
910
+ delete $x->{_a}; delete $x->{_p};
911
+ }
912
+ return $x;
913
+ }
914
+ }
915
+
916
+ # when user set globals, they would interfere with our calculation, so
917
+ # disable them and later re-enable them
918
+ no strict 'refs';
919
+ my $abr = "$self\::accuracy"; my $ab = $$abr; $$abr = undef;
920
+ my $pbr = "$self\::precision"; my $pb = $$pbr; $$pbr = undef;
921
+ # we also need to disable any set A or P on $x (_find_round_parameters took
922
+ # them already into account), since these would interfere, too
923
+ delete $x->{_a}; delete $x->{_p};
924
+ # need to disable $upgrade in BigInt, to avoid deep recursion
925
+ local $Math::BigInt::upgrade = undef;
926
+ local $Math::BigFloat::downgrade = undef;
927
+
928
+ # upgrade $x if $x is not a BigFloat (handle BigInt input)
929
+ # XXX TODO: rebless!
930
+ if (!$x->isa('Math::BigFloat'))
931
+ {
932
+ $x = Math::BigFloat->new($x);
933
+ $self = ref($x);
934
+ }
935
+
936
+ my $done = 0;
937
+
938
+ # If the base is defined and an integer, try to calculate integer result
939
+ # first. This is very fast, and in case the real result was found, we can
940
+ # stop right here.
941
+ if (defined $base && $base->is_int() && $x->is_int())
942
+ {
943
+ my $i = $MBI->_copy( $x->{_m} );
944
+ $MBI->_lsft( $i, $x->{_e}, 10 ) unless $MBI->_is_zero($x->{_e});
945
+ my $int = Math::BigInt->bzero();
946
+ $int->{value} = $i;
947
+ $int->blog($base->as_number());
948
+ # if ($exact)
949
+ if ($base->as_number()->bpow($int) == $x)
950
+ {
951
+ # found result, return it
952
+ $x->{_m} = $int->{value};
953
+ $x->{_e} = $MBI->_zero();
954
+ $x->{_es} = '+';
955
+ $x->bnorm();
956
+ $done = 1;
957
+ }
958
+ }
959
+
960
+ if ($done == 0)
961
+ {
962
+ # base is undef, so base should be e (Euler's number), so first calculate the
963
+ # log to base e (using reduction by 10 (and probably 2)):
964
+ $self->_log_10($x,$scale);
965
+
966
+ # and if a different base was requested, convert it
967
+ if (defined $base)
968
+ {
969
+ $base = Math::BigFloat->new($base) unless $base->isa('Math::BigFloat');
970
+ # not ln, but some other base (don't modify $base)
971
+ $x->bdiv( $base->copy()->blog(undef,$scale), $scale );
972
+ }
973
+ }
974
+
975
+ # shortcut to not run through _find_round_parameters again
976
+ if (defined $params[0])
977
+ {
978
+ $x->bround($params[0],$params[2]); # then round accordingly
979
+ }
980
+ else
981
+ {
982
+ $x->bfround($params[1],$params[2]); # then round accordingly
983
+ }
984
+ if ($fallback)
985
+ {
986
+ # clear a/p after round, since user did not request it
987
+ delete $x->{_a}; delete $x->{_p};
988
+ }
989
+ # restore globals
990
+ $$abr = $ab; $$pbr = $pb;
991
+
992
+ $x;
993
+ }
994
+
995
+ sub _len_to_steps
996
+ {
997
+ # Given D (digits in decimal), compute N so that N! (N factorial) is
998
+ # at least D digits long. D should be at least 50.
999
+ my $d = shift;
1000
+
1001
+ # two constants for the Ramanujan estimate of ln(N!)
1002
+ my $lg2 = log(2 * 3.14159265) / 2;
1003
+ my $lg10 = log(10);
1004
+
1005
+ # D = 50 => N => 42, so L = 40 and R = 50
1006
+ my $l = 40; my $r = $d;
1007
+
1008
+ # Otherwise this does not work under -Mbignum and we do not yet have "no bignum;" :(
1009
+ $l = $l->numify if ref($l);
1010
+ $r = $r->numify if ref($r);
1011
+ $lg2 = $lg2->numify if ref($lg2);
1012
+ $lg10 = $lg10->numify if ref($lg10);
1013
+
1014
+ # binary search for the right value (could this be written as the reverse of lg(n!)?)
1015
+ while ($r - $l > 1)
1016
+ {
1017
+ my $n = int(($r - $l) / 2) + $l;
1018
+ my $ramanujan =
1019
+ int(($n * log($n) - $n + log( $n * (1 + 4*$n*(1+2*$n)) ) / 6 + $lg2) / $lg10);
1020
+ $ramanujan > $d ? $r = $n : $l = $n;
1021
+ }
1022
+ $l;
1023
+ }
1024
+
1025
+ sub bnok
1026
+ {
1027
+ # Calculate n over k (binomial coefficient or "choose" function) as integer.
1028
+ # set up parameters
1029
+ my ($self,$x,$y,@r) = (ref($_[0]),@_);
1030
+
1031
+ # objectify is costly, so avoid it
1032
+ if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1])))
1033
+ {
1034
+ ($self,$x,$y,@r) = objectify(2,@_);
1035
+ }
1036
+
1037
+ return $x if $x->modify('bnok');
1038
+
1039
+ return $x->bnan() if $x->is_nan() || $y->is_nan();
1040
+ return $x->binf() if $x->is_inf();
1041
+
1042
+ my $u = $x->as_int();
1043
+ $u->bnok($y->as_int());
1044
+
1045
+ $x->{_m} = $u->{value};
1046
+ $x->{_e} = $MBI->_zero();
1047
+ $x->{_es} = '+';
1048
+ $x->{sign} = '+';
1049
+ $x->bnorm(@r);
1050
+ }
1051
+
1052
+ sub bexp
1053
+ {
1054
+ # Calculate e ** X (Euler's number to the power of X)
1055
+ my ($self,$x,$a,$p,$r) = ref($_[0]) ? (ref($_[0]),@_) : objectify(1,@_);
1056
+
1057
+ return $x if $x->modify('bexp');
1058
+
1059
+ return $x->binf() if $x->{sign} eq '+inf';
1060
+ return $x->bzero() if $x->{sign} eq '-inf';
1061
+
1062
+ # we need to limit the accuracy to protect against overflow
1063
+ my $fallback = 0;
1064
+ my ($scale,@params);
1065
+ ($x,@params) = $x->_find_round_parameters($a,$p,$r);
1066
+
1067
+ # also takes care of the "error in _find_round_parameters?" case
1068
+ return $x if $x->{sign} eq 'NaN';
1069
+
1070
+ # no rounding at all, so must use fallback
1071
+ if (scalar @params == 0)
1072
+ {
1073
+ # simulate old behaviour
1074
+ $params[0] = $self->div_scale(); # and round to it as accuracy
1075
+ $params[1] = undef; # P = undef
1076
+ $scale = $params[0]+4; # at least four more for proper round
1077
+ $params[2] = $r; # round mode by caller or undef
1078
+ $fallback = 1; # to clear a/p afterwards
1079
+ }
1080
+ else
1081
+ {
1082
+ # the 4 below is empirical, and there might be cases where it's not enough...
1083
+ $scale = abs($params[0] || $params[1]) + 4; # take whatever is defined
1084
+ }
1085
+
1086
+ return $x->bone(@params) if $x->is_zero();
1087
+
1088
+ if (!$x->isa('Math::BigFloat'))
1089
+ {
1090
+ $x = Math::BigFloat->new($x);
1091
+ $self = ref($x);
1092
+ }
1093
+
1094
+ # when user set globals, they would interfere with our calculation, so
1095
+ # disable them and later re-enable them
1096
+ no strict 'refs';
1097
+ my $abr = "$self\::accuracy"; my $ab = $$abr; $$abr = undef;
1098
+ my $pbr = "$self\::precision"; my $pb = $$pbr; $$pbr = undef;
1099
+ # we also need to disable any set A or P on $x (_find_round_parameters took
1100
+ # them already into account), since these would interfere, too
1101
+ delete $x->{_a}; delete $x->{_p};
1102
+ # need to disable $upgrade in BigInt, to avoid deep recursion
1103
+ local $Math::BigInt::upgrade = undef;
1104
+ local $Math::BigFloat::downgrade = undef;
1105
+
1106
+ my $x_org = $x->copy();
1107
+
1108
+ # We use the following Taylor series:
1109
+
1110
+ # x x^2 x^3 x^4
1111
+ # e = 1 + --- + --- + --- + --- ...
1112
+ # 1! 2! 3! 4!
1113
+
1114
+ # The difference for each term is X and N, which would result in:
1115
+ # 2 copy, 2 mul, 2 add, 1 inc, 1 div operations per term
1116
+
1117
+ # But it is faster to compute exp(1) and then raising it to the
1118
+ # given power, esp. if $x is really big and an integer because:
1119
+
1120
+ # * The numerator is always 1, making the computation faster
1121
+ # * the series converges faster in the case of x == 1
1122
+ # * We can also easily check when we have reached our limit: when the
1123
+ # term to be added is smaller than "1E$scale", we can stop - f.i.
1124
+ # scale == 5, and we have 1/40320, then we stop since 1/40320 < 1E-5.
1125
+ # * we can compute the *exact* result by simulating bigrat math:
1126
+
1127
+ # 1 1 gcd(3,4) = 1 1*24 + 1*6 5
1128
+ # - + - = ---------- = --
1129
+ # 6 24 6*24 24
1130
+
1131
+ # We do not compute the gcd() here, but simple do:
1132
+ # 1 1 1*24 + 1*6 30
1133
+ # - + - = --------- = --
1134
+ # 6 24 6*24 144
1135
+
1136
+ # In general:
1137
+ # a c a*d + c*b and note that c is always 1 and d = (b*f)
1138
+ # - + - = ---------
1139
+ # b d b*d
1140
+
1141
+ # This leads to: which can be reduced by b to:
1142
+ # a 1 a*b*f + b a*f + 1
1143
+ # - + - = --------- = -------
1144
+ # b b*f b*b*f b*f
1145
+
1146
+ # The first terms in the series are:
1147
+
1148
+ # 1 1 1 1 1 1 1 1 13700
1149
+ # -- + -- + -- + -- + -- + --- + --- + ---- = -----
1150
+ # 1 1 2 6 24 120 720 5040 5040
1151
+
1152
+ # Note that we cannot simple reduce 13700/5040 to 685/252, but must keep A and B!
1153
+
1154
+ if ($scale <= 75)
1155
+ {
1156
+ # set $x directly from a cached string form
1157
+ $x->{_m} = $MBI->_new(
1158
+ "27182818284590452353602874713526624977572470936999595749669676277240766303535476");
1159
+ $x->{sign} = '+';
1160
+ $x->{_es} = '-';
1161
+ $x->{_e} = $MBI->_new(79);
1162
+ }
1163
+ else
1164
+ {
1165
+ # compute A and B so that e = A / B.
1166
+
1167
+ # After some terms we end up with this, so we use it as a starting point:
1168
+ my $A = $MBI->_new("90933395208605785401971970164779391644753259799242");
1169
+ my $F = $MBI->_new(42); my $step = 42;
1170
+
1171
+ # Compute how many steps we need to take to get $A and $B sufficiently big
1172
+ my $steps = _len_to_steps($scale - 4);
1173
+ # print STDERR "# Doing $steps steps for ", $scale-4, " digits\n";
1174
+ while ($step++ <= $steps)
1175
+ {
1176
+ # calculate $a * $f + 1
1177
+ $A = $MBI->_mul($A, $F);
1178
+ $A = $MBI->_inc($A);
1179
+ # increment f
1180
+ $F = $MBI->_inc($F);
1181
+ }
1182
+ # compute $B as factorial of $steps (this is faster than doing it manually)
1183
+ my $B = $MBI->_fac($MBI->_new($steps));
1184
+
1185
+ # print "A ", $MBI->_str($A), "\nB ", $MBI->_str($B), "\n";
1186
+
1187
+ # compute A/B with $scale digits in the result (truncate, not round)
1188
+ $A = $MBI->_lsft( $A, $MBI->_new($scale), 10);
1189
+ $A = $MBI->_div( $A, $B );
1190
+
1191
+ $x->{_m} = $A;
1192
+ $x->{sign} = '+';
1193
+ $x->{_es} = '-';
1194
+ $x->{_e} = $MBI->_new($scale);
1195
+ }
1196
+
1197
+ # $x contains now an estimate of e, with some surplus digits, so we can round
1198
+ if (!$x_org->is_one())
1199
+ {
1200
+ # raise $x to the wanted power and round it in one step:
1201
+ $x->bpow($x_org, @params);
1202
+ }
1203
+ else
1204
+ {
1205
+ # else just round the already computed result
1206
+ delete $x->{_a}; delete $x->{_p};
1207
+ # shortcut to not run through _find_round_parameters again
1208
+ if (defined $params[0])
1209
+ {
1210
+ $x->bround($params[0],$params[2]); # then round accordingly
1211
+ }
1212
+ else
1213
+ {
1214
+ $x->bfround($params[1],$params[2]); # then round accordingly
1215
+ }
1216
+ }
1217
+ if ($fallback)
1218
+ {
1219
+ # clear a/p after round, since user did not request it
1220
+ delete $x->{_a}; delete $x->{_p};
1221
+ }
1222
+ # restore globals
1223
+ $$abr = $ab; $$pbr = $pb;
1224
+
1225
+ $x; # return modified $x
1226
+ }
1227
+
1228
+ sub _log
1229
+ {
1230
+ # internal log function to calculate ln() based on Taylor series.
1231
+ # Modifies $x in place.
1232
+ my ($self,$x,$scale) = @_;
1233
+
1234
+ # in case of $x == 1, result is 0
1235
+ return $x->bzero() if $x->is_one();
1236
+
1237
+ # XXX TODO: rewrite this in a similar manner to bexp()
1238
+
1239
+ # http://www.efunda.com/math/taylor_series/logarithmic.cfm?search_string=log
1240
+
1241
+ # u = x-1, v = x+1
1242
+ # _ _
1243
+ # Taylor: | u 1 u^3 1 u^5 |
1244
+ # ln (x) = 2 | --- + - * --- + - * --- + ... | x > 0
1245
+ # |_ v 3 v^3 5 v^5 _|
1246
+
1247
+ # This takes much more steps to calculate the result and is thus not used
1248
+ # u = x-1
1249
+ # _ _
1250
+ # Taylor: | u 1 u^2 1 u^3 |
1251
+ # ln (x) = 2 | --- + - * --- + - * --- + ... | x > 1/2
1252
+ # |_ x 2 x^2 3 x^3 _|
1253
+
1254
+ my ($limit,$v,$u,$below,$factor,$two,$next,$over,$f);
1255
+
1256
+ $v = $x->copy(); $v->binc(); # v = x+1
1257
+ $x->bdec(); $u = $x->copy(); # u = x-1; x = x-1
1258
+ $x->bdiv($v,$scale); # first term: u/v
1259
+ $below = $v->copy();
1260
+ $over = $u->copy();
1261
+ $u *= $u; $v *= $v; # u^2, v^2
1262
+ $below->bmul($v); # u^3, v^3
1263
+ $over->bmul($u);
1264
+ $factor = $self->new(3); $f = $self->new(2);
1265
+
1266
+ my $steps = 0 if DEBUG;
1267
+ $limit = $self->new("1E-". ($scale-1));
1268
+ while (3 < 5)
1269
+ {
1270
+ # we calculate the next term, and add it to the last
1271
+ # when the next term is below our limit, it won't affect the outcome
1272
+ # anymore, so we stop
1273
+
1274
+ # calculating the next term simple from over/below will result in quite
1275
+ # a time hog if the input has many digits, since over and below will
1276
+ # accumulate more and more digits, and the result will also have many
1277
+ # digits, but in the end it is rounded to $scale digits anyway. So if we
1278
+ # round $over and $below first, we save a lot of time for the division
1279
+ # (not with log(1.2345), but try log (123**123) to see what I mean. This
1280
+ # can introduce a rounding error if the division result would be f.i.
1281
+ # 0.1234500000001 and we round it to 5 digits it would become 0.12346, but
1282
+ # if we truncated $over and $below we might get 0.12345. Does this matter
1283
+ # for the end result? So we give $over and $below 4 more digits to be
1284
+ # on the safe side (unscientific error handling as usual... :+D
1285
+
1286
+ $next = $over->copy->bround($scale+4)->bdiv(
1287
+ $below->copy->bmul($factor)->bround($scale+4),
1288
+ $scale);
1289
+
1290
+ ## old version:
1291
+ ## $next = $over->copy()->bdiv($below->copy()->bmul($factor),$scale);
1292
+
1293
+ last if $next->bacmp($limit) <= 0;
1294
+
1295
+ delete $next->{_a}; delete $next->{_p};
1296
+ $x->badd($next);
1297
+ # calculate things for the next term
1298
+ $over *= $u; $below *= $v; $factor->badd($f);
1299
+ if (DEBUG)
1300
+ {
1301
+ $steps++; print "step $steps = $x\n" if $steps % 10 == 0;
1302
+ }
1303
+ }
1304
+ print "took $steps steps\n" if DEBUG;
1305
+ $x->bmul($f); # $x *= 2
1306
+ }
1307
+
1308
+ sub _log_10
1309
+ {
1310
+ # Internal log function based on reducing input to the range of 0.1 .. 9.99
1311
+ # and then "correcting" the result to the proper one. Modifies $x in place.
1312
+ my ($self,$x,$scale) = @_;
1313
+
1314
+ # Taking blog() from numbers greater than 10 takes a *very long* time, so we
1315
+ # break the computation down into parts based on the observation that:
1316
+ # blog(X*Y) = blog(X) + blog(Y)
1317
+ # We set Y here to multiples of 10 so that $x becomes below 1 - the smaller
1318
+ # $x is the faster it gets. Since 2*$x takes about 10 times as
1319
+ # long, we make it faster by about a factor of 100 by dividing $x by 10.
1320
+
1321
+ # The same observation is valid for numbers smaller than 0.1, e.g. computing
1322
+ # log(1) is fastest, and the further away we get from 1, the longer it takes.
1323
+ # So we also 'break' this down by multiplying $x with 10 and subtract the
1324
+ # log(10) afterwards to get the correct result.
1325
+
1326
+ # To get $x even closer to 1, we also divide by 2 and then use log(2) to
1327
+ # correct for this. For instance if $x is 2.4, we use the formula:
1328
+ # blog(2.4 * 2) == blog (1.2) + blog(2)
1329
+ # and thus calculate only blog(1.2) and blog(2), which is faster in total
1330
+ # than calculating blog(2.4).
1331
+
1332
+ # In addition, the values for blog(2) and blog(10) are cached.
1333
+
1334
+ # Calculate nr of digits before dot:
1335
+ my $dbd = $MBI->_num($x->{_e});
1336
+ $dbd = -$dbd if $x->{_es} eq '-';
1337
+ $dbd += $MBI->_len($x->{_m});
1338
+
1339
+ # more than one digit (e.g. at least 10), but *not* exactly 10 to avoid
1340
+ # infinite recursion
1341
+
1342
+ my $calc = 1; # do some calculation?
1343
+
1344
+ # disable the shortcut for 10, since we need log(10) and this would recurse
1345
+ # infinitely deep
1346
+ if ($x->{_es} eq '+' && $MBI->_is_one($x->{_e}) && $MBI->_is_one($x->{_m}))
1347
+ {
1348
+ $dbd = 0; # disable shortcut
1349
+ # we can use the cached value in these cases
1350
+ if ($scale <= $LOG_10_A)
1351
+ {
1352
+ $x->bzero(); $x->badd($LOG_10); # modify $x in place
1353
+ $calc = 0; # no need to calc, but round
1354
+ }
1355
+ # if we can't use the shortcut, we continue normally
1356
+ }
1357
+ else
1358
+ {
1359
+ # disable the shortcut for 2, since we maybe have it cached
1360
+ if (($MBI->_is_zero($x->{_e}) && $MBI->_is_two($x->{_m})))
1361
+ {
1362
+ $dbd = 0; # disable shortcut
1363
+ # we can use the cached value in these cases
1364
+ if ($scale <= $LOG_2_A)
1365
+ {
1366
+ $x->bzero(); $x->badd($LOG_2); # modify $x in place
1367
+ $calc = 0; # no need to calc, but round
1368
+ }
1369
+ # if we can't use the shortcut, we continue normally
1370
+ }
1371
+ }
1372
+
1373
+ # if $x = 0.1, we know the result must be 0-log(10)
1374
+ if ($calc != 0 && $x->{_es} eq '-' && $MBI->_is_one($x->{_e}) &&
1375
+ $MBI->_is_one($x->{_m}))
1376
+ {
1377
+ $dbd = 0; # disable shortcut
1378
+ # we can use the cached value in these cases
1379
+ if ($scale <= $LOG_10_A)
1380
+ {
1381
+ $x->bzero(); $x->bsub($LOG_10);
1382
+ $calc = 0; # no need to calc, but round
1383
+ }
1384
+ }
1385
+
1386
+ return if $calc == 0; # already have the result
1387
+
1388
+ # default: these correction factors are undef and thus not used
1389
+ my $l_10; # value of ln(10) to A of $scale
1390
+ my $l_2; # value of ln(2) to A of $scale
1391
+
1392
+ my $two = $self->new(2);
1393
+
1394
+ # $x == 2 => 1, $x == 13 => 2, $x == 0.1 => 0, $x == 0.01 => -1
1395
+ # so don't do this shortcut for 1 or 0
1396
+ if (($dbd > 1) || ($dbd < 0))
1397
+ {
1398
+ # convert our cached value to an object if not already (avoid doing this
1399
+ # at import() time, since not everybody needs this)
1400
+ $LOG_10 = $self->new($LOG_10,undef,undef) unless ref $LOG_10;
1401
+
1402
+ #print "x = $x, dbd = $dbd, calc = $calc\n";
1403
+ # got more than one digit before the dot, or more than one zero after the
1404
+ # dot, so do:
1405
+ # log(123) == log(1.23) + log(10) * 2
1406
+ # log(0.0123) == log(1.23) - log(10) * 2
1407
+
1408
+ if ($scale <= $LOG_10_A)
1409
+ {
1410
+ # use cached value
1411
+ $l_10 = $LOG_10->copy(); # copy for mul
1412
+ }
1413
+ else
1414
+ {
1415
+ # else: slower, compute and cache result
1416
+ # also disable downgrade for this code path
1417
+ local $Math::BigFloat::downgrade = undef;
1418
+
1419
+ # shorten the time to calculate log(10) based on the following:
1420
+ # log(1.25 * 8) = log(1.25) + log(8)
1421
+ # = log(1.25) + log(2) + log(2) + log(2)
1422
+
1423
+ # first get $l_2 (and possible compute and cache log(2))
1424
+ $LOG_2 = $self->new($LOG_2,undef,undef) unless ref $LOG_2;
1425
+ if ($scale <= $LOG_2_A)
1426
+ {
1427
+ # use cached value
1428
+ $l_2 = $LOG_2->copy(); # copy() for the mul below
1429
+ }
1430
+ else
1431
+ {
1432
+ # else: slower, compute and cache result
1433
+ $l_2 = $two->copy(); $self->_log($l_2, $scale); # scale+4, actually
1434
+ $LOG_2 = $l_2->copy(); # cache the result for later
1435
+ # the copy() is for mul below
1436
+ $LOG_2_A = $scale;
1437
+ }
1438
+
1439
+ # now calculate log(1.25):
1440
+ $l_10 = $self->new('1.25'); $self->_log($l_10, $scale); # scale+4, actually
1441
+
1442
+ # log(1.25) + log(2) + log(2) + log(2):
1443
+ $l_10->badd($l_2);
1444
+ $l_10->badd($l_2);
1445
+ $l_10->badd($l_2);
1446
+ $LOG_10 = $l_10->copy(); # cache the result for later
1447
+ # the copy() is for mul below
1448
+ $LOG_10_A = $scale;
1449
+ }
1450
+ $dbd-- if ($dbd > 1); # 20 => dbd=2, so make it dbd=1
1451
+ $l_10->bmul( $self->new($dbd)); # log(10) * (digits_before_dot-1)
1452
+ my $dbd_sign = '+';
1453
+ if ($dbd < 0)
1454
+ {
1455
+ $dbd = -$dbd;
1456
+ $dbd_sign = '-';
1457
+ }
1458
+ ($x->{_e}, $x->{_es}) =
1459
+ _e_sub( $x->{_e}, $MBI->_new($dbd), $x->{_es}, $dbd_sign); # 123 => 1.23
1460
+
1461
+ }
1462
+
1463
+ # Now: 0.1 <= $x < 10 (and possible correction in l_10)
1464
+
1465
+ ### Since $x in the range 0.5 .. 1.5 is MUCH faster, we do a repeated div
1466
+ ### or mul by 2 (maximum times 3, since x < 10 and x > 0.1)
1467
+
1468
+ $HALF = $self->new($HALF) unless ref($HALF);
1469
+
1470
+ my $twos = 0; # default: none (0 times)
1471
+ while ($x->bacmp($HALF) <= 0) # X <= 0.5
1472
+ {
1473
+ $twos--; $x->bmul($two);
1474
+ }
1475
+ while ($x->bacmp($two) >= 0) # X >= 2
1476
+ {
1477
+ $twos++; $x->bdiv($two,$scale+4); # keep all digits
1478
+ }
1479
+ # $twos > 0 => did mul 2, < 0 => did div 2 (but we never did both)
1480
+ # So calculate correction factor based on ln(2):
1481
+ if ($twos != 0)
1482
+ {
1483
+ $LOG_2 = $self->new($LOG_2,undef,undef) unless ref $LOG_2;
1484
+ if ($scale <= $LOG_2_A)
1485
+ {
1486
+ # use cached value
1487
+ $l_2 = $LOG_2->copy(); # copy() for the mul below
1488
+ }
1489
+ else
1490
+ {
1491
+ # else: slower, compute and cache result
1492
+ # also disable downgrade for this code path
1493
+ local $Math::BigFloat::downgrade = undef;
1494
+ $l_2 = $two->copy(); $self->_log($l_2, $scale); # scale+4, actually
1495
+ $LOG_2 = $l_2->copy(); # cache the result for later
1496
+ # the copy() is for mul below
1497
+ $LOG_2_A = $scale;
1498
+ }
1499
+ $l_2->bmul($twos); # * -2 => subtract, * 2 => add
1500
+ }
1501
+
1502
+ $self->_log($x,$scale); # need to do the "normal" way
1503
+ $x->badd($l_10) if defined $l_10; # correct it by ln(10)
1504
+ $x->badd($l_2) if defined $l_2; # and maybe by ln(2)
1505
+
1506
+ # all done, $x contains now the result
1507
+ $x;
1508
+ }
1509
+
1510
+ sub blcm
1511
+ {
1512
+ # (BFLOAT or num_str, BFLOAT or num_str) return BFLOAT
1513
+ # does not modify arguments, but returns new object
1514
+ # Lowest Common Multiplicator
1515
+
1516
+ my ($self,@arg) = objectify(0,@_);
1517
+ my $x = $self->new(shift @arg);
1518
+ while (@arg) { $x = Math::BigInt::__lcm($x,shift @arg); }
1519
+ $x;
1520
+ }
1521
+
1522
+ sub bgcd
1523
+ {
1524
+ # (BINT or num_str, BINT or num_str) return BINT
1525
+ # does not modify arguments, but returns new object
1526
+
1527
+ my $y = shift;
1528
+ $y = __PACKAGE__->new($y) if !ref($y);
1529
+ my $self = ref($y);
1530
+ my $x = $y->copy()->babs(); # keep arguments
1531
+
1532
+ return $x->bnan() if $x->{sign} !~ /^[+-]$/ # x NaN?
1533
+ || !$x->is_int(); # only for integers now
1534
+
1535
+ while (@_)
1536
+ {
1537
+ my $t = shift; $t = $self->new($t) if !ref($t);
1538
+ $y = $t->copy()->babs();
1539
+
1540
+ return $x->bnan() if $y->{sign} !~ /^[+-]$/ # y NaN?
1541
+ || !$y->is_int(); # only for integers now
1542
+
1543
+ # greatest common divisor
1544
+ while (! $y->is_zero())
1545
+ {
1546
+ ($x,$y) = ($y->copy(), $x->copy()->bmod($y));
1547
+ }
1548
+
1549
+ last if $x->is_one();
1550
+ }
1551
+ $x;
1552
+ }
1553
+
1554
+ ##############################################################################
1555
+
1556
+ sub _e_add
1557
+ {
1558
+ # Internal helper sub to take two positive integers and their signs and
1559
+ # then add them. Input ($CALC,$CALC,('+'|'-'),('+'|'-')),
1560
+ # output ($CALC,('+'|'-'))
1561
+ my ($x,$y,$xs,$ys) = @_;
1562
+
1563
+ # if the signs are equal we can add them (-5 + -3 => -(5 + 3) => -8)
1564
+ if ($xs eq $ys)
1565
+ {
1566
+ $x = $MBI->_add ($x, $y ); # a+b
1567
+ # the sign follows $xs
1568
+ return ($x, $xs);
1569
+ }
1570
+
1571
+ my $a = $MBI->_acmp($x,$y);
1572
+ if ($a > 0)
1573
+ {
1574
+ $x = $MBI->_sub ($x , $y); # abs sub
1575
+ }
1576
+ elsif ($a == 0)
1577
+ {
1578
+ $x = $MBI->_zero(); # result is 0
1579
+ $xs = '+';
1580
+ }
1581
+ else # a < 0
1582
+ {
1583
+ $x = $MBI->_sub ( $y, $x, 1 ); # abs sub
1584
+ $xs = $ys;
1585
+ }
1586
+ ($x,$xs);
1587
+ }
1588
+
1589
+ sub _e_sub
1590
+ {
1591
+ # Internal helper sub to take two positive integers and their signs and
1592
+ # then subtract them. Input ($CALC,$CALC,('+'|'-'),('+'|'-')),
1593
+ # output ($CALC,('+'|'-'))
1594
+ my ($x,$y,$xs,$ys) = @_;
1595
+
1596
+ # flip sign
1597
+ $ys =~ tr/+-/-+/;
1598
+ _e_add($x,$y,$xs,$ys); # call add (does subtract now)
1599
+ }
1600
+
1601
+ ###############################################################################
1602
+ # is_foo methods (is_negative, is_positive are inherited from BigInt)
1603
+
1604
+ sub is_int
1605
+ {
1606
+ # return true if arg (BFLOAT or num_str) is an integer
1607
+ my ($self,$x) = ref($_[0]) ? (undef,$_[0]) : objectify(1,@_);
1608
+
1609
+ (($x->{sign} =~ /^[+-]$/) && # NaN and +-inf aren't
1610
+ ($x->{_es} eq '+')) ? 1 : 0; # 1e-1 => no integer
1611
+ }
1612
+
1613
+ sub is_zero
1614
+ {
1615
+ # return true if arg (BFLOAT or num_str) is zero
1616
+ my ($self,$x) = ref($_[0]) ? (undef,$_[0]) : objectify(1,@_);
1617
+
1618
+ ($x->{sign} eq '+' && $MBI->_is_zero($x->{_m})) ? 1 : 0;
1619
+ }
1620
+
1621
+ sub is_one
1622
+ {
1623
+ # return true if arg (BFLOAT or num_str) is +1 or -1 if signis given
1624
+ my ($self,$x,$sign) = ref($_[0]) ? (undef,@_) : objectify(1,@_);
1625
+
1626
+ $sign = '+' if !defined $sign || $sign ne '-';
1627
+
1628
+ ($x->{sign} eq $sign &&
1629
+ $MBI->_is_zero($x->{_e}) &&
1630
+ $MBI->_is_one($x->{_m}) ) ? 1 : 0;
1631
+ }
1632
+
1633
+ sub is_odd
1634
+ {
1635
+ # return true if arg (BFLOAT or num_str) is odd or false if even
1636
+ my ($self,$x) = ref($_[0]) ? (undef,$_[0]) : objectify(1,@_);
1637
+
1638
+ (($x->{sign} =~ /^[+-]$/) && # NaN & +-inf aren't
1639
+ ($MBI->_is_zero($x->{_e})) &&
1640
+ ($MBI->_is_odd($x->{_m}))) ? 1 : 0;
1641
+ }
1642
+
1643
+ sub is_even
1644
+ {
1645
+ # return true if arg (BINT or num_str) is even or false if odd
1646
+ my ($self,$x) = ref($_[0]) ? (undef,$_[0]) : objectify(1,@_);
1647
+
1648
+ (($x->{sign} =~ /^[+-]$/) && # NaN & +-inf aren't
1649
+ ($x->{_es} eq '+') && # 123.45 isn't
1650
+ ($MBI->_is_even($x->{_m}))) ? 1 : 0; # but 1200 is
1651
+ }
1652
+
1653
+ sub bmul
1654
+ {
1655
+ # multiply two numbers
1656
+
1657
+ # set up parameters
1658
+ my ($self,$x,$y,@r) = (ref($_[0]),@_);
1659
+ # objectify is costly, so avoid it
1660
+ if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1])))
1661
+ {
1662
+ ($self,$x,$y,@r) = objectify(2,@_);
1663
+ }
1664
+
1665
+ return $x if $x->modify('bmul');
1666
+
1667
+ return $x->bnan() if (($x->{sign} eq $nan) || ($y->{sign} eq $nan));
1668
+
1669
+ # inf handling
1670
+ if (($x->{sign} =~ /^[+-]inf$/) || ($y->{sign} =~ /^[+-]inf$/))
1671
+ {
1672
+ return $x->bnan() if $x->is_zero() || $y->is_zero();
1673
+ # result will always be +-inf:
1674
+ # +inf * +/+inf => +inf, -inf * -/-inf => +inf
1675
+ # +inf * -/-inf => -inf, -inf * +/+inf => -inf
1676
+ return $x->binf() if ($x->{sign} =~ /^\+/ && $y->{sign} =~ /^\+/);
1677
+ return $x->binf() if ($x->{sign} =~ /^-/ && $y->{sign} =~ /^-/);
1678
+ return $x->binf('-');
1679
+ }
1680
+
1681
+ return $upgrade->bmul($x,$y,@r) if defined $upgrade &&
1682
+ ((!$x->isa($self)) || (!$y->isa($self)));
1683
+
1684
+ # aEb * cEd = (a*c)E(b+d)
1685
+ $MBI->_mul($x->{_m},$y->{_m});
1686
+ ($x->{_e}, $x->{_es}) = _e_add($x->{_e}, $y->{_e}, $x->{_es}, $y->{_es});
1687
+
1688
+ $r[3] = $y; # no push!
1689
+
1690
+ # adjust sign:
1691
+ $x->{sign} = $x->{sign} ne $y->{sign} ? '-' : '+';
1692
+ $x->bnorm->round(@r);
1693
+ }
1694
+
1695
+ sub bmuladd
1696
+ {
1697
+ # multiply two numbers and add the third to the result
1698
+
1699
+ # set up parameters
1700
+ my ($self,$x,$y,$z,@r) = objectify(3,@_);
1701
+
1702
+ return $x if $x->modify('bmuladd');
1703
+
1704
+ return $x->bnan() if (($x->{sign} eq $nan) ||
1705
+ ($y->{sign} eq $nan) ||
1706
+ ($z->{sign} eq $nan));
1707
+
1708
+ # inf handling
1709
+ if (($x->{sign} =~ /^[+-]inf$/) || ($y->{sign} =~ /^[+-]inf$/))
1710
+ {
1711
+ return $x->bnan() if $x->is_zero() || $y->is_zero();
1712
+ # result will always be +-inf:
1713
+ # +inf * +/+inf => +inf, -inf * -/-inf => +inf
1714
+ # +inf * -/-inf => -inf, -inf * +/+inf => -inf
1715
+ return $x->binf() if ($x->{sign} =~ /^\+/ && $y->{sign} =~ /^\+/);
1716
+ return $x->binf() if ($x->{sign} =~ /^-/ && $y->{sign} =~ /^-/);
1717
+ return $x->binf('-');
1718
+ }
1719
+
1720
+ return $upgrade->bmul($x,$y,@r) if defined $upgrade &&
1721
+ ((!$x->isa($self)) || (!$y->isa($self)));
1722
+
1723
+ # aEb * cEd = (a*c)E(b+d)
1724
+ $MBI->_mul($x->{_m},$y->{_m});
1725
+ ($x->{_e}, $x->{_es}) = _e_add($x->{_e}, $y->{_e}, $x->{_es}, $y->{_es});
1726
+
1727
+ $r[3] = $y; # no push!
1728
+
1729
+ # adjust sign:
1730
+ $x->{sign} = $x->{sign} ne $y->{sign} ? '-' : '+';
1731
+
1732
+ # z=inf handling (z=NaN handled above)
1733
+ $x->{sign} = $z->{sign}, return $x if $z->{sign} =~ /^[+-]inf$/;
1734
+
1735
+ # take lower of the two e's and adapt m1 to it to match m2
1736
+ my $e = $z->{_e};
1737
+ $e = $MBI->_zero() if !defined $e; # if no BFLOAT?
1738
+ $e = $MBI->_copy($e); # make copy (didn't do it yet)
1739
+
1740
+ my $es;
1741
+
1742
+ ($e,$es) = _e_sub($e, $x->{_e}, $z->{_es} || '+', $x->{_es});
1743
+
1744
+ my $add = $MBI->_copy($z->{_m});
1745
+
1746
+ if ($es eq '-') # < 0
1747
+ {
1748
+ $MBI->_lsft( $x->{_m}, $e, 10);
1749
+ ($x->{_e},$x->{_es}) = _e_add($x->{_e}, $e, $x->{_es}, $es);
1750
+ }
1751
+ elsif (!$MBI->_is_zero($e)) # > 0
1752
+ {
1753
+ $MBI->_lsft($add, $e, 10);
1754
+ }
1755
+ # else: both e are the same, so just leave them
1756
+
1757
+ if ($x->{sign} eq $z->{sign})
1758
+ {
1759
+ # add
1760
+ $x->{_m} = $MBI->_add($x->{_m}, $add);
1761
+ }
1762
+ else
1763
+ {
1764
+ ($x->{_m}, $x->{sign}) =
1765
+ _e_add($x->{_m}, $add, $x->{sign}, $z->{sign});
1766
+ }
1767
+
1768
+ # delete trailing zeros, then round
1769
+ $x->bnorm()->round(@r);
1770
+ }
1771
+
1772
+ sub bdiv
1773
+ {
1774
+ # (dividend: BFLOAT or num_str, divisor: BFLOAT or num_str) return
1775
+ # (BFLOAT,BFLOAT) (quo,rem) or BFLOAT (only rem)
1776
+
1777
+ # set up parameters
1778
+ my ($self,$x,$y,$a,$p,$r) = (ref($_[0]),@_);
1779
+ # objectify is costly, so avoid it
1780
+ if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1])))
1781
+ {
1782
+ ($self,$x,$y,$a,$p,$r) = objectify(2,@_);
1783
+ }
1784
+
1785
+ return $x if $x->modify('bdiv');
1786
+
1787
+ return $self->_div_inf($x,$y)
1788
+ if (($x->{sign} !~ /^[+-]$/) || ($y->{sign} !~ /^[+-]$/) || $y->is_zero());
1789
+
1790
+ # x== 0 # also: or y == 1 or y == -1
1791
+ return wantarray ? ($x,$self->bzero()) : $x if $x->is_zero();
1792
+
1793
+ # upgrade ?
1794
+ return $upgrade->bdiv($upgrade->new($x),$y,$a,$p,$r) if defined $upgrade;
1795
+
1796
+ # we need to limit the accuracy to protect against overflow
1797
+ my $fallback = 0;
1798
+ my (@params,$scale);
1799
+ ($x,@params) = $x->_find_round_parameters($a,$p,$r,$y);
1800
+
1801
+ return $x if $x->is_nan(); # error in _find_round_parameters?
1802
+
1803
+ # no rounding at all, so must use fallback
1804
+ if (scalar @params == 0)
1805
+ {
1806
+ # simulate old behaviour
1807
+ $params[0] = $self->div_scale(); # and round to it as accuracy
1808
+ $scale = $params[0]+4; # at least four more for proper round
1809
+ $params[2] = $r; # round mode by caller or undef
1810
+ $fallback = 1; # to clear a/p afterwards
1811
+ }
1812
+ else
1813
+ {
1814
+ # the 4 below is empirical, and there might be cases where it is not
1815
+ # enough...
1816
+ $scale = abs($params[0] || $params[1]) + 4; # take whatever is defined
1817
+ }
1818
+
1819
+ my $rem; $rem = $self->bzero() if wantarray;
1820
+
1821
+ $y = $self->new($y) unless $y->isa('Math::BigFloat');
1822
+
1823
+ my $lx = $MBI->_len($x->{_m}); my $ly = $MBI->_len($y->{_m});
1824
+ $scale = $lx if $lx > $scale;
1825
+ $scale = $ly if $ly > $scale;
1826
+ my $diff = $ly - $lx;
1827
+ $scale += $diff if $diff > 0; # if lx << ly, but not if ly << lx!
1828
+
1829
+ # already handled inf/NaN/-inf above:
1830
+
1831
+ # check that $y is not 1 nor -1 and cache the result:
1832
+ my $y_not_one = !($MBI->_is_zero($y->{_e}) && $MBI->_is_one($y->{_m}));
1833
+
1834
+ # flipping the sign of $y will also flip the sign of $x for the special
1835
+ # case of $x->bsub($x); so we can catch it below:
1836
+ my $xsign = $x->{sign};
1837
+ $y->{sign} =~ tr/+-/-+/;
1838
+
1839
+ if ($xsign ne $x->{sign})
1840
+ {
1841
+ # special case of $x /= $x results in 1
1842
+ $x->bone(); # "fixes" also sign of $y, since $x is $y
1843
+ }
1844
+ else
1845
+ {
1846
+ # correct $y's sign again
1847
+ $y->{sign} =~ tr/+-/-+/;
1848
+ # continue with normal div code:
1849
+
1850
+ # make copy of $x in case of list context for later remainder calculation
1851
+ if (wantarray && $y_not_one)
1852
+ {
1853
+ $rem = $x->copy();
1854
+ }
1855
+
1856
+ $x->{sign} = $x->{sign} ne $y->sign() ? '-' : '+';
1857
+
1858
+ # check for / +-1 ( +/- 1E0)
1859
+ if ($y_not_one)
1860
+ {
1861
+ # promote BigInts and it's subclasses (except when already a BigFloat)
1862
+ $y = $self->new($y) unless $y->isa('Math::BigFloat');
1863
+
1864
+ # calculate the result to $scale digits and then round it
1865
+ # a * 10 ** b / c * 10 ** d => a/c * 10 ** (b-d)
1866
+ $MBI->_lsft($x->{_m},$MBI->_new($scale),10);
1867
+ $MBI->_div ($x->{_m},$y->{_m}); # a/c
1868
+
1869
+ # correct exponent of $x
1870
+ ($x->{_e},$x->{_es}) = _e_sub($x->{_e}, $y->{_e}, $x->{_es}, $y->{_es});
1871
+ # correct for 10**scale
1872
+ ($x->{_e},$x->{_es}) = _e_sub($x->{_e}, $MBI->_new($scale), $x->{_es}, '+');
1873
+ $x->bnorm(); # remove trailing 0's
1874
+ }
1875
+ } # ende else $x != $y
1876
+
1877
+ # shortcut to not run through _find_round_parameters again
1878
+ if (defined $params[0])
1879
+ {
1880
+ delete $x->{_a}; # clear before round
1881
+ $x->bround($params[0],$params[2]); # then round accordingly
1882
+ }
1883
+ else
1884
+ {
1885
+ delete $x->{_p}; # clear before round
1886
+ $x->bfround($params[1],$params[2]); # then round accordingly
1887
+ }
1888
+ if ($fallback)
1889
+ {
1890
+ # clear a/p after round, since user did not request it
1891
+ delete $x->{_a}; delete $x->{_p};
1892
+ }
1893
+
1894
+ if (wantarray)
1895
+ {
1896
+ if ($y_not_one)
1897
+ {
1898
+ $rem->bmod($y,@params); # copy already done
1899
+ }
1900
+ if ($fallback)
1901
+ {
1902
+ # clear a/p after round, since user did not request it
1903
+ delete $rem->{_a}; delete $rem->{_p};
1904
+ }
1905
+ return ($x,$rem);
1906
+ }
1907
+ $x;
1908
+ }
1909
+
1910
+ sub bmod
1911
+ {
1912
+ # (dividend: BFLOAT or num_str, divisor: BFLOAT or num_str) return remainder
1913
+
1914
+ # set up parameters
1915
+ my ($self,$x,$y,$a,$p,$r) = (ref($_[0]),@_);
1916
+ # objectify is costly, so avoid it
1917
+ if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1])))
1918
+ {
1919
+ ($self,$x,$y,$a,$p,$r) = objectify(2,@_);
1920
+ }
1921
+
1922
+ return $x if $x->modify('bmod');
1923
+
1924
+ # handle NaN, inf, -inf
1925
+ if (($x->{sign} !~ /^[+-]$/) || ($y->{sign} !~ /^[+-]$/))
1926
+ {
1927
+ my ($d,$re) = $self->SUPER::_div_inf($x,$y);
1928
+ $x->{sign} = $re->{sign};
1929
+ $x->{_e} = $re->{_e};
1930
+ $x->{_m} = $re->{_m};
1931
+ return $x->round($a,$p,$r,$y);
1932
+ }
1933
+ if ($y->is_zero())
1934
+ {
1935
+ return $x->bnan() if $x->is_zero();
1936
+ return $x;
1937
+ }
1938
+
1939
+ return $x->bzero() if $x->is_zero()
1940
+ || ($x->is_int() &&
1941
+ # check that $y == +1 or $y == -1:
1942
+ ($MBI->_is_zero($y->{_e}) && $MBI->_is_one($y->{_m})));
1943
+
1944
+ my $cmp = $x->bacmp($y); # equal or $x < $y?
1945
+ return $x->bzero($a,$p) if $cmp == 0; # $x == $y => result 0
1946
+
1947
+ # only $y of the operands negative?
1948
+ my $neg = 0; $neg = 1 if $x->{sign} ne $y->{sign};
1949
+
1950
+ $x->{sign} = $y->{sign}; # calc sign first
1951
+ return $x->round($a,$p,$r) if $cmp < 0 && $neg == 0; # $x < $y => result $x
1952
+
1953
+ my $ym = $MBI->_copy($y->{_m});
1954
+
1955
+ # 2e1 => 20
1956
+ $MBI->_lsft( $ym, $y->{_e}, 10)
1957
+ if $y->{_es} eq '+' && !$MBI->_is_zero($y->{_e});
1958
+
1959
+ # if $y has digits after dot
1960
+ my $shifty = 0; # correct _e of $x by this
1961
+ if ($y->{_es} eq '-') # has digits after dot
1962
+ {
1963
+ # 123 % 2.5 => 1230 % 25 => 5 => 0.5
1964
+ $shifty = $MBI->_num($y->{_e}); # no more digits after dot
1965
+ $MBI->_lsft($x->{_m}, $y->{_e}, 10);# 123 => 1230, $y->{_m} is already 25
1966
+ }
1967
+ # $ym is now mantissa of $y based on exponent 0
1968
+
1969
+ my $shiftx = 0; # correct _e of $x by this
1970
+ if ($x->{_es} eq '-') # has digits after dot
1971
+ {
1972
+ # 123.4 % 20 => 1234 % 200
1973
+ $shiftx = $MBI->_num($x->{_e}); # no more digits after dot
1974
+ $MBI->_lsft($ym, $x->{_e}, 10); # 123 => 1230
1975
+ }
1976
+ # 123e1 % 20 => 1230 % 20
1977
+ if ($x->{_es} eq '+' && !$MBI->_is_zero($x->{_e}))
1978
+ {
1979
+ $MBI->_lsft( $x->{_m}, $x->{_e},10); # es => '+' here
1980
+ }
1981
+
1982
+ $x->{_e} = $MBI->_new($shiftx);
1983
+ $x->{_es} = '+';
1984
+ $x->{_es} = '-' if $shiftx != 0 || $shifty != 0;
1985
+ $MBI->_add( $x->{_e}, $MBI->_new($shifty)) if $shifty != 0;
1986
+
1987
+ # now mantissas are equalized, exponent of $x is adjusted, so calc result
1988
+
1989
+ $x->{_m} = $MBI->_mod( $x->{_m}, $ym);
1990
+
1991
+ $x->{sign} = '+' if $MBI->_is_zero($x->{_m}); # fix sign for -0
1992
+ $x->bnorm();
1993
+
1994
+ if ($neg != 0) # one of them negative => correct in place
1995
+ {
1996
+ my $r = $y - $x;
1997
+ $x->{_m} = $r->{_m};
1998
+ $x->{_e} = $r->{_e};
1999
+ $x->{_es} = $r->{_es};
2000
+ $x->{sign} = '+' if $MBI->_is_zero($x->{_m}); # fix sign for -0
2001
+ $x->bnorm();
2002
+ }
2003
+
2004
+ $x->round($a,$p,$r,$y); # round and return
2005
+ }
2006
+
2007
+ sub broot
2008
+ {
2009
+ # calculate $y'th root of $x
2010
+
2011
+ # set up parameters
2012
+ my ($self,$x,$y,$a,$p,$r) = (ref($_[0]),@_);
2013
+ # objectify is costly, so avoid it
2014
+ if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1])))
2015
+ {
2016
+ ($self,$x,$y,$a,$p,$r) = objectify(2,@_);
2017
+ }
2018
+
2019
+ return $x if $x->modify('broot');
2020
+
2021
+ # NaN handling: $x ** 1/0, x or y NaN, or y inf/-inf or y == 0
2022
+ return $x->bnan() if $x->{sign} !~ /^\+/ || $y->is_zero() ||
2023
+ $y->{sign} !~ /^\+$/;
2024
+
2025
+ return $x if $x->is_zero() || $x->is_one() || $x->is_inf() || $y->is_one();
2026
+
2027
+ # we need to limit the accuracy to protect against overflow
2028
+ my $fallback = 0;
2029
+ my (@params,$scale);
2030
+ ($x,@params) = $x->_find_round_parameters($a,$p,$r);
2031
+
2032
+ return $x if $x->is_nan(); # error in _find_round_parameters?
2033
+
2034
+ # no rounding at all, so must use fallback
2035
+ if (scalar @params == 0)
2036
+ {
2037
+ # simulate old behaviour
2038
+ $params[0] = $self->div_scale(); # and round to it as accuracy
2039
+ $scale = $params[0]+4; # at least four more for proper round
2040
+ $params[2] = $r; # iound mode by caller or undef
2041
+ $fallback = 1; # to clear a/p afterwards
2042
+ }
2043
+ else
2044
+ {
2045
+ # the 4 below is empirical, and there might be cases where it is not
2046
+ # enough...
2047
+ $scale = abs($params[0] || $params[1]) + 4; # take whatever is defined
2048
+ }
2049
+
2050
+ # when user set globals, they would interfere with our calculation, so
2051
+ # disable them and later re-enable them
2052
+ no strict 'refs';
2053
+ my $abr = "$self\::accuracy"; my $ab = $$abr; $$abr = undef;
2054
+ my $pbr = "$self\::precision"; my $pb = $$pbr; $$pbr = undef;
2055
+ # we also need to disable any set A or P on $x (_find_round_parameters took
2056
+ # them already into account), since these would interfere, too
2057
+ delete $x->{_a}; delete $x->{_p};
2058
+ # need to disable $upgrade in BigInt, to avoid deep recursion
2059
+ local $Math::BigInt::upgrade = undef; # should be really parent class vs MBI
2060
+
2061
+ # remember sign and make $x positive, since -4 ** (1/2) => -2
2062
+ my $sign = 0; $sign = 1 if $x->{sign} eq '-'; $x->{sign} = '+';
2063
+
2064
+ my $is_two = 0;
2065
+ if ($y->isa('Math::BigFloat'))
2066
+ {
2067
+ $is_two = ($y->{sign} eq '+' && $MBI->_is_two($y->{_m}) && $MBI->_is_zero($y->{_e}));
2068
+ }
2069
+ else
2070
+ {
2071
+ $is_two = ($y == 2);
2072
+ }
2073
+
2074
+ # normal square root if $y == 2:
2075
+ if ($is_two)
2076
+ {
2077
+ $x->bsqrt($scale+4);
2078
+ }
2079
+ elsif ($y->is_one('-'))
2080
+ {
2081
+ # $x ** -1 => 1/$x
2082
+ my $u = $self->bone()->bdiv($x,$scale);
2083
+ # copy private parts over
2084
+ $x->{_m} = $u->{_m};
2085
+ $x->{_e} = $u->{_e};
2086
+ $x->{_es} = $u->{_es};
2087
+ }
2088
+ else
2089
+ {
2090
+ # calculate the broot() as integer result first, and if it fits, return
2091
+ # it rightaway (but only if $x and $y are integer):
2092
+
2093
+ my $done = 0; # not yet
2094
+ if ($y->is_int() && $x->is_int())
2095
+ {
2096
+ my $i = $MBI->_copy( $x->{_m} );
2097
+ $MBI->_lsft( $i, $x->{_e}, 10 ) unless $MBI->_is_zero($x->{_e});
2098
+ my $int = Math::BigInt->bzero();
2099
+ $int->{value} = $i;
2100
+ $int->broot($y->as_number());
2101
+ # if ($exact)
2102
+ if ($int->copy()->bpow($y) == $x)
2103
+ {
2104
+ # found result, return it
2105
+ $x->{_m} = $int->{value};
2106
+ $x->{_e} = $MBI->_zero();
2107
+ $x->{_es} = '+';
2108
+ $x->bnorm();
2109
+ $done = 1;
2110
+ }
2111
+ }
2112
+ if ($done == 0)
2113
+ {
2114
+ my $u = $self->bone()->bdiv($y,$scale+4);
2115
+ delete $u->{_a}; delete $u->{_p}; # otherwise it conflicts
2116
+ $x->bpow($u,$scale+4); # el cheapo
2117
+ }
2118
+ }
2119
+ $x->bneg() if $sign == 1;
2120
+
2121
+ # shortcut to not run through _find_round_parameters again
2122
+ if (defined $params[0])
2123
+ {
2124
+ $x->bround($params[0],$params[2]); # then round accordingly
2125
+ }
2126
+ else
2127
+ {
2128
+ $x->bfround($params[1],$params[2]); # then round accordingly
2129
+ }
2130
+ if ($fallback)
2131
+ {
2132
+ # clear a/p after round, since user did not request it
2133
+ delete $x->{_a}; delete $x->{_p};
2134
+ }
2135
+ # restore globals
2136
+ $$abr = $ab; $$pbr = $pb;
2137
+ $x;
2138
+ }
2139
+
2140
+ sub bsqrt
2141
+ {
2142
+ # calculate square root
2143
+ my ($self,$x,$a,$p,$r) = ref($_[0]) ? (ref($_[0]),@_) : objectify(1,@_);
2144
+
2145
+ return $x if $x->modify('bsqrt');
2146
+
2147
+ return $x->bnan() if $x->{sign} !~ /^[+]/; # NaN, -inf or < 0
2148
+ return $x if $x->{sign} eq '+inf'; # sqrt(inf) == inf
2149
+ return $x->round($a,$p,$r) if $x->is_zero() || $x->is_one();
2150
+
2151
+ # we need to limit the accuracy to protect against overflow
2152
+ my $fallback = 0;
2153
+ my (@params,$scale);
2154
+ ($x,@params) = $x->_find_round_parameters($a,$p,$r);
2155
+
2156
+ return $x if $x->is_nan(); # error in _find_round_parameters?
2157
+
2158
+ # no rounding at all, so must use fallback
2159
+ if (scalar @params == 0)
2160
+ {
2161
+ # simulate old behaviour
2162
+ $params[0] = $self->div_scale(); # and round to it as accuracy
2163
+ $scale = $params[0]+4; # at least four more for proper round
2164
+ $params[2] = $r; # round mode by caller or undef
2165
+ $fallback = 1; # to clear a/p afterwards
2166
+ }
2167
+ else
2168
+ {
2169
+ # the 4 below is empirical, and there might be cases where it is not
2170
+ # enough...
2171
+ $scale = abs($params[0] || $params[1]) + 4; # take whatever is defined
2172
+ }
2173
+
2174
+ # when user set globals, they would interfere with our calculation, so
2175
+ # disable them and later re-enable them
2176
+ no strict 'refs';
2177
+ my $abr = "$self\::accuracy"; my $ab = $$abr; $$abr = undef;
2178
+ my $pbr = "$self\::precision"; my $pb = $$pbr; $$pbr = undef;
2179
+ # we also need to disable any set A or P on $x (_find_round_parameters took
2180
+ # them already into account), since these would interfere, too
2181
+ delete $x->{_a}; delete $x->{_p};
2182
+ # need to disable $upgrade in BigInt, to avoid deep recursion
2183
+ local $Math::BigInt::upgrade = undef; # should be really parent class vs MBI
2184
+
2185
+ my $i = $MBI->_copy( $x->{_m} );
2186
+ $MBI->_lsft( $i, $x->{_e}, 10 ) unless $MBI->_is_zero($x->{_e});
2187
+ my $xas = Math::BigInt->bzero();
2188
+ $xas->{value} = $i;
2189
+
2190
+ my $gs = $xas->copy()->bsqrt(); # some guess
2191
+
2192
+ if (($x->{_es} ne '-') # guess can't be accurate if there are
2193
+ # digits after the dot
2194
+ && ($xas->bacmp($gs * $gs) == 0)) # guess hit the nail on the head?
2195
+ {
2196
+ # exact result, copy result over to keep $x
2197
+ $x->{_m} = $gs->{value}; $x->{_e} = $MBI->_zero(); $x->{_es} = '+';
2198
+ $x->bnorm();
2199
+ # shortcut to not run through _find_round_parameters again
2200
+ if (defined $params[0])
2201
+ {
2202
+ $x->bround($params[0],$params[2]); # then round accordingly
2203
+ }
2204
+ else
2205
+ {
2206
+ $x->bfround($params[1],$params[2]); # then round accordingly
2207
+ }
2208
+ if ($fallback)
2209
+ {
2210
+ # clear a/p after round, since user did not request it
2211
+ delete $x->{_a}; delete $x->{_p};
2212
+ }
2213
+ # re-enable A and P, upgrade is taken care of by "local"
2214
+ ${"$self\::accuracy"} = $ab; ${"$self\::precision"} = $pb;
2215
+ return $x;
2216
+ }
2217
+
2218
+ # sqrt(2) = 1.4 because sqrt(2*100) = 1.4*10; so we can increase the accuracy
2219
+ # of the result by multiplying the input by 100 and then divide the integer
2220
+ # result of sqrt(input) by 10. Rounding afterwards returns the real result.
2221
+
2222
+ # The following steps will transform 123.456 (in $x) into 123456 (in $y1)
2223
+ my $y1 = $MBI->_copy($x->{_m});
2224
+
2225
+ my $length = $MBI->_len($y1);
2226
+
2227
+ # Now calculate how many digits the result of sqrt(y1) would have
2228
+ my $digits = int($length / 2);
2229
+
2230
+ # But we need at least $scale digits, so calculate how many are missing
2231
+ my $shift = $scale - $digits;
2232
+
2233
+ # This happens if the input had enough digits
2234
+ # (we take care of integer guesses above)
2235
+ $shift = 0 if $shift < 0;
2236
+
2237
+ # Multiply in steps of 100, by shifting left two times the "missing" digits
2238
+ my $s2 = $shift * 2;
2239
+
2240
+ # We now make sure that $y1 has the same odd or even number of digits than
2241
+ # $x had. So when _e of $x is odd, we must shift $y1 by one digit left,
2242
+ # because we always must multiply by steps of 100 (sqrt(100) is 10) and not
2243
+ # steps of 10. The length of $x does not count, since an even or odd number
2244
+ # of digits before the dot is not changed by adding an even number of digits
2245
+ # after the dot (the result is still odd or even digits long).
2246
+ $s2++ if $MBI->_is_odd($x->{_e});
2247
+
2248
+ $MBI->_lsft( $y1, $MBI->_new($s2), 10);
2249
+
2250
+ # now take the square root and truncate to integer
2251
+ $y1 = $MBI->_sqrt($y1);
2252
+
2253
+ # By "shifting" $y1 right (by creating a negative _e) we calculate the final
2254
+ # result, which is than later rounded to the desired scale.
2255
+
2256
+ # calculate how many zeros $x had after the '.' (or before it, depending
2257
+ # on sign of $dat, the result should have half as many:
2258
+ my $dat = $MBI->_num($x->{_e});
2259
+ $dat = -$dat if $x->{_es} eq '-';
2260
+ $dat += $length;
2261
+
2262
+ if ($dat > 0)
2263
+ {
2264
+ # no zeros after the dot (e.g. 1.23, 0.49 etc)
2265
+ # preserve half as many digits before the dot than the input had
2266
+ # (but round this "up")
2267
+ $dat = int(($dat+1)/2);
2268
+ }
2269
+ else
2270
+ {
2271
+ $dat = int(($dat)/2);
2272
+ }
2273
+ $dat -= $MBI->_len($y1);
2274
+ if ($dat < 0)
2275
+ {
2276
+ $dat = abs($dat);
2277
+ $x->{_e} = $MBI->_new( $dat );
2278
+ $x->{_es} = '-';
2279
+ }
2280
+ else
2281
+ {
2282
+ $x->{_e} = $MBI->_new( $dat );
2283
+ $x->{_es} = '+';
2284
+ }
2285
+ $x->{_m} = $y1;
2286
+ $x->bnorm();
2287
+
2288
+ # shortcut to not run through _find_round_parameters again
2289
+ if (defined $params[0])
2290
+ {
2291
+ $x->bround($params[0],$params[2]); # then round accordingly
2292
+ }
2293
+ else
2294
+ {
2295
+ $x->bfround($params[1],$params[2]); # then round accordingly
2296
+ }
2297
+ if ($fallback)
2298
+ {
2299
+ # clear a/p after round, since user did not request it
2300
+ delete $x->{_a}; delete $x->{_p};
2301
+ }
2302
+ # restore globals
2303
+ $$abr = $ab; $$pbr = $pb;
2304
+ $x;
2305
+ }
2306
+
2307
+ sub bfac
2308
+ {
2309
+ # (BFLOAT or num_str, BFLOAT or num_str) return BFLOAT
2310
+ # compute factorial number, modifies first argument
2311
+
2312
+ # set up parameters
2313
+ my ($self,$x,@r) = (ref($_[0]),@_);
2314
+ # objectify is costly, so avoid it
2315
+ ($self,$x,@r) = objectify(1,@_) if !ref($x);
2316
+
2317
+ # inf => inf
2318
+ return $x if $x->modify('bfac') || $x->{sign} eq '+inf';
2319
+
2320
+ return $x->bnan()
2321
+ if (($x->{sign} ne '+') || # inf, NaN, <0 etc => NaN
2322
+ ($x->{_es} ne '+')); # digits after dot?
2323
+
2324
+ # use BigInt's bfac() for faster calc
2325
+ if (! $MBI->_is_zero($x->{_e}))
2326
+ {
2327
+ $MBI->_lsft($x->{_m}, $x->{_e},10); # change 12e1 to 120e0
2328
+ $x->{_e} = $MBI->_zero(); # normalize
2329
+ $x->{_es} = '+';
2330
+ }
2331
+ $MBI->_fac($x->{_m}); # calculate factorial
2332
+ $x->bnorm()->round(@r); # norm again and round result
2333
+ }
2334
+
2335
+ sub _pow
2336
+ {
2337
+ # Calculate a power where $y is a non-integer, like 2 ** 0.3
2338
+ my ($x,$y,@r) = @_;
2339
+ my $self = ref($x);
2340
+
2341
+ # if $y == 0.5, it is sqrt($x)
2342
+ $HALF = $self->new($HALF) unless ref($HALF);
2343
+ return $x->bsqrt(@r,$y) if $y->bcmp($HALF) == 0;
2344
+
2345
+ # Using:
2346
+ # a ** x == e ** (x * ln a)
2347
+
2348
+ # u = y * ln x
2349
+ # _ _
2350
+ # Taylor: | u u^2 u^3 |
2351
+ # x ** y = 1 + | --- + --- + ----- + ... |
2352
+ # |_ 1 1*2 1*2*3 _|
2353
+
2354
+ # we need to limit the accuracy to protect against overflow
2355
+ my $fallback = 0;
2356
+ my ($scale,@params);
2357
+ ($x,@params) = $x->_find_round_parameters(@r);
2358
+
2359
+ return $x if $x->is_nan(); # error in _find_round_parameters?
2360
+
2361
+ # no rounding at all, so must use fallback
2362
+ if (scalar @params == 0)
2363
+ {
2364
+ # simulate old behaviour
2365
+ $params[0] = $self->div_scale(); # and round to it as accuracy
2366
+ $params[1] = undef; # disable P
2367
+ $scale = $params[0]+4; # at least four more for proper round
2368
+ $params[2] = $r[2]; # round mode by caller or undef
2369
+ $fallback = 1; # to clear a/p afterwards
2370
+ }
2371
+ else
2372
+ {
2373
+ # the 4 below is empirical, and there might be cases where it is not
2374
+ # enough...
2375
+ $scale = abs($params[0] || $params[1]) + 4; # take whatever is defined
2376
+ }
2377
+
2378
+ # when user set globals, they would interfere with our calculation, so
2379
+ # disable them and later re-enable them
2380
+ no strict 'refs';
2381
+ my $abr = "$self\::accuracy"; my $ab = $$abr; $$abr = undef;
2382
+ my $pbr = "$self\::precision"; my $pb = $$pbr; $$pbr = undef;
2383
+ # we also need to disable any set A or P on $x (_find_round_parameters took
2384
+ # them already into account), since these would interfere, too
2385
+ delete $x->{_a}; delete $x->{_p};
2386
+ # need to disable $upgrade in BigInt, to avoid deep recursion
2387
+ local $Math::BigInt::upgrade = undef;
2388
+
2389
+ my ($limit,$v,$u,$below,$factor,$next,$over);
2390
+
2391
+ $u = $x->copy()->blog(undef,$scale)->bmul($y);
2392
+ $v = $self->bone(); # 1
2393
+ $factor = $self->new(2); # 2
2394
+ $x->bone(); # first term: 1
2395
+
2396
+ $below = $v->copy();
2397
+ $over = $u->copy();
2398
+
2399
+ $limit = $self->new("1E-". ($scale-1));
2400
+ #my $steps = 0;
2401
+ while (3 < 5)
2402
+ {
2403
+ # we calculate the next term, and add it to the last
2404
+ # when the next term is below our limit, it won't affect the outcome
2405
+ # anymore, so we stop:
2406
+ $next = $over->copy()->bdiv($below,$scale);
2407
+ last if $next->bacmp($limit) <= 0;
2408
+ $x->badd($next);
2409
+ # calculate things for the next term
2410
+ $over *= $u; $below *= $factor; $factor->binc();
2411
+
2412
+ last if $x->{sign} !~ /^[-+]$/;
2413
+
2414
+ #$steps++;
2415
+ }
2416
+
2417
+ # shortcut to not run through _find_round_parameters again
2418
+ if (defined $params[0])
2419
+ {
2420
+ $x->bround($params[0],$params[2]); # then round accordingly
2421
+ }
2422
+ else
2423
+ {
2424
+ $x->bfround($params[1],$params[2]); # then round accordingly
2425
+ }
2426
+ if ($fallback)
2427
+ {
2428
+ # clear a/p after round, since user did not request it
2429
+ delete $x->{_a}; delete $x->{_p};
2430
+ }
2431
+ # restore globals
2432
+ $$abr = $ab; $$pbr = $pb;
2433
+ $x;
2434
+ }
2435
+
2436
+ sub bpow
2437
+ {
2438
+ # (BFLOAT or num_str, BFLOAT or num_str) return BFLOAT
2439
+ # compute power of two numbers, second arg is used as integer
2440
+ # modifies first argument
2441
+
2442
+ # set up parameters
2443
+ my ($self,$x,$y,$a,$p,$r) = (ref($_[0]),@_);
2444
+ # objectify is costly, so avoid it
2445
+ if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1])))
2446
+ {
2447
+ ($self,$x,$y,$a,$p,$r) = objectify(2,@_);
2448
+ }
2449
+
2450
+ return $x if $x->modify('bpow');
2451
+
2452
+ return $x->bnan() if $x->{sign} eq $nan || $y->{sign} eq $nan;
2453
+ return $x if $x->{sign} =~ /^[+-]inf$/;
2454
+
2455
+ # cache the result of is_zero
2456
+ my $y_is_zero = $y->is_zero();
2457
+ return $x->bone() if $y_is_zero;
2458
+ return $x if $x->is_one() || $y->is_one();
2459
+
2460
+ my $x_is_zero = $x->is_zero();
2461
+ return $x->_pow($y,$a,$p,$r) if !$x_is_zero && !$y->is_int(); # non-integer power
2462
+
2463
+ my $y1 = $y->as_number()->{value}; # make MBI part
2464
+
2465
+ # if ($x == -1)
2466
+ if ($x->{sign} eq '-' && $MBI->_is_one($x->{_m}) && $MBI->_is_zero($x->{_e}))
2467
+ {
2468
+ # if $x == -1 and odd/even y => +1/-1 because +-1 ^ (+-1) => +-1
2469
+ return $MBI->_is_odd($y1) ? $x : $x->babs(1);
2470
+ }
2471
+ if ($x_is_zero)
2472
+ {
2473
+ return $x if $y->{sign} eq '+'; # 0**y => 0 (if not y <= 0)
2474
+ # 0 ** -y => 1 / (0 ** y) => 1 / 0! (1 / 0 => +inf)
2475
+ return $x->binf();
2476
+ }
2477
+
2478
+ my $new_sign = '+';
2479
+ $new_sign = $MBI->_is_odd($y1) ? '-' : '+' if $x->{sign} ne '+';
2480
+
2481
+ # calculate $x->{_m} ** $y and $x->{_e} * $y separately (faster)
2482
+ $x->{_m} = $MBI->_pow( $x->{_m}, $y1);
2483
+ $x->{_e} = $MBI->_mul ($x->{_e}, $y1);
2484
+
2485
+ $x->{sign} = $new_sign;
2486
+ $x->bnorm();
2487
+ if ($y->{sign} eq '-')
2488
+ {
2489
+ # modify $x in place!
2490
+ my $z = $x->copy(); $x->bone();
2491
+ return scalar $x->bdiv($z,$a,$p,$r); # round in one go (might ignore y's A!)
2492
+ }
2493
+ $x->round($a,$p,$r,$y);
2494
+ }
2495
+
2496
+ sub bmodpow
2497
+ {
2498
+ # takes a very large number to a very large exponent in a given very
2499
+ # large modulus, quickly, thanks to binary exponentiation. Supports
2500
+ # negative exponents.
2501
+ my ($self,$num,$exp,$mod,@r) = objectify(3,@_);
2502
+
2503
+ return $num if $num->modify('bmodpow');
2504
+
2505
+ # check modulus for valid values
2506
+ return $num->bnan() if ($mod->{sign} ne '+' # NaN, - , -inf, +inf
2507
+ || $mod->is_zero());
2508
+
2509
+ # check exponent for valid values
2510
+ if ($exp->{sign} =~ /\w/)
2511
+ {
2512
+ # i.e., if it's NaN, +inf, or -inf...
2513
+ return $num->bnan();
2514
+ }
2515
+
2516
+ $num->bmodinv ($mod) if ($exp->{sign} eq '-');
2517
+
2518
+ # check num for valid values (also NaN if there was no inverse but $exp < 0)
2519
+ return $num->bnan() if $num->{sign} !~ /^[+-]$/;
2520
+
2521
+ # $mod is positive, sign on $exp is ignored, result also positive
2522
+
2523
+ # XXX TODO: speed it up when all three numbers are integers
2524
+ $num->bpow($exp)->bmod($mod);
2525
+ }
2526
+
2527
+ ###############################################################################
2528
+ # trigonometric functions
2529
+
2530
+ # helper function for bpi() and batan2(), calculates arcus tanges (1/x)
2531
+
2532
+ sub _atan_inv
2533
+ {
2534
+ # return a/b so that a/b approximates atan(1/x) to at least limit digits
2535
+ my ($self, $x, $limit) = @_;
2536
+
2537
+ # Taylor: x^3 x^5 x^7 x^9
2538
+ # atan = x - --- + --- - --- + --- - ...
2539
+ # 3 5 7 9
2540
+
2541
+ # 1 1 1 1
2542
+ # atan 1/x = - - ------- + ------- - ------- + ...
2543
+ # x x^3 * 3 x^5 * 5 x^7 * 7
2544
+
2545
+ # 1 1 1 1
2546
+ # atan 1/x = - - --------- + ---------- - ----------- + ...
2547
+ # 5 3 * 125 5 * 3125 7 * 78125
2548
+
2549
+ # Subtraction/addition of a rational:
2550
+
2551
+ # 5 7 5*3 +- 7*4
2552
+ # - +- - = ----------
2553
+ # 4 3 4*3
2554
+
2555
+ # Term: N N+1
2556
+ #
2557
+ # a 1 a * d * c +- b
2558
+ # ----- +- ------------------ = ----------------
2559
+ # b d * c b * d * c
2560
+
2561
+ # since b1 = b0 * (d-2) * c
2562
+
2563
+ # a 1 a * d +- b / c
2564
+ # ----- +- ------------------ = ----------------
2565
+ # b d * c b * d
2566
+
2567
+ # and d = d + 2
2568
+ # and c = c * x * x
2569
+
2570
+ # u = d * c
2571
+ # stop if length($u) > limit
2572
+ # a = a * u +- b
2573
+ # b = b * u
2574
+ # d = d + 2
2575
+ # c = c * x * x
2576
+ # sign = 1 - sign
2577
+
2578
+ my $a = $MBI->_one();
2579
+ my $b = $MBI->_copy($x);
2580
+
2581
+ my $x2 = $MBI->_mul( $MBI->_copy($x), $b); # x2 = x * x
2582
+ my $d = $MBI->_new( 3 ); # d = 3
2583
+ my $c = $MBI->_mul( $MBI->_copy($x), $x2); # c = x ^ 3
2584
+ my $two = $MBI->_new( 2 );
2585
+
2586
+ # run the first step unconditionally
2587
+ my $u = $MBI->_mul( $MBI->_copy($d), $c);
2588
+ $a = $MBI->_mul($a, $u);
2589
+ $a = $MBI->_sub($a, $b);
2590
+ $b = $MBI->_mul($b, $u);
2591
+ $d = $MBI->_add($d, $two);
2592
+ $c = $MBI->_mul($c, $x2);
2593
+
2594
+ # a is now a * (d-3) * c
2595
+ # b is now b * (d-2) * c
2596
+
2597
+ # run the second step unconditionally
2598
+ $u = $MBI->_mul( $MBI->_copy($d), $c);
2599
+ $a = $MBI->_mul($a, $u);
2600
+ $a = $MBI->_add($a, $b);
2601
+ $b = $MBI->_mul($b, $u);
2602
+ $d = $MBI->_add($d, $two);
2603
+ $c = $MBI->_mul($c, $x2);
2604
+
2605
+ # a is now a * (d-3) * (d-5) * c * c
2606
+ # b is now b * (d-2) * (d-4) * c * c
2607
+
2608
+ # so we can remove c * c from both a and b to shorten the numbers involved:
2609
+ $a = $MBI->_div($a, $x2);
2610
+ $b = $MBI->_div($b, $x2);
2611
+ $a = $MBI->_div($a, $x2);
2612
+ $b = $MBI->_div($b, $x2);
2613
+
2614
+ # my $step = 0;
2615
+ my $sign = 0; # 0 => -, 1 => +
2616
+ while (3 < 5)
2617
+ {
2618
+ # $step++;
2619
+ # if (($i++ % 100) == 0)
2620
+ # {
2621
+ # print "a=",$MBI->_str($a),"\n";
2622
+ # print "b=",$MBI->_str($b),"\n";
2623
+ # }
2624
+ # print "d=",$MBI->_str($d),"\n";
2625
+ # print "x2=",$MBI->_str($x2),"\n";
2626
+ # print "c=",$MBI->_str($c),"\n";
2627
+
2628
+ my $u = $MBI->_mul( $MBI->_copy($d), $c);
2629
+ # use _alen() for libs like GMP where _len() would be O(N^2)
2630
+ last if $MBI->_alen($u) > $limit;
2631
+ my ($bc,$r) = $MBI->_div( $MBI->_copy($b), $c);
2632
+ if ($MBI->_is_zero($r))
2633
+ {
2634
+ # b / c is an integer, so we can remove c from all terms
2635
+ # this happens almost every time:
2636
+ $a = $MBI->_mul($a, $d);
2637
+ $a = $MBI->_sub($a, $bc) if $sign == 0;
2638
+ $a = $MBI->_add($a, $bc) if $sign == 1;
2639
+ $b = $MBI->_mul($b, $d);
2640
+ }
2641
+ else
2642
+ {
2643
+ # b / c is not an integer, so we keep c in the terms
2644
+ # this happens very rarely, for instance for x = 5, this happens only
2645
+ # at the following steps:
2646
+ # 1, 5, 14, 32, 72, 157, 340, ...
2647
+ $a = $MBI->_mul($a, $u);
2648
+ $a = $MBI->_sub($a, $b) if $sign == 0;
2649
+ $a = $MBI->_add($a, $b) if $sign == 1;
2650
+ $b = $MBI->_mul($b, $u);
2651
+ }
2652
+ $d = $MBI->_add($d, $two);
2653
+ $c = $MBI->_mul($c, $x2);
2654
+ $sign = 1 - $sign;
2655
+
2656
+ }
2657
+
2658
+ # print "Took $step steps for ", $MBI->_str($x),"\n";
2659
+ # print "a=",$MBI->_str($a),"\n"; print "b=",$MBI->_str($b),"\n";
2660
+ # return a/b so that a/b approximates atan(1/x)
2661
+ ($a,$b);
2662
+ }
2663
+
2664
+ sub bpi
2665
+ {
2666
+ my ($self,$n) = @_;
2667
+ if (@_ == 0)
2668
+ {
2669
+ $self = $class;
2670
+ }
2671
+ if (@_ == 1)
2672
+ {
2673
+ # called like Math::BigFloat::bpi(10);
2674
+ $n = $self; $self = $class;
2675
+ # called like Math::BigFloat->bpi();
2676
+ $n = undef if $n eq 'Math::BigFloat';
2677
+ }
2678
+ $self = ref($self) if ref($self);
2679
+ my $fallback = defined $n ? 0 : 1;
2680
+ $n = 40 if !defined $n || $n < 1;
2681
+
2682
+ # after 黃見利 (Hwang Chien-Lih) (1997)
2683
+ # pi/4 = 183 * atan(1/239) + 32 * atan(1/1023) – 68 * atan(1/5832)
2684
+ # + 12 * atan(1/110443) - 12 * atan(1/4841182) - 100 * atan(1/6826318)
2685
+
2686
+ # a few more to prevent rounding errors
2687
+ $n += 4;
2688
+
2689
+ my ($a,$b) = $self->_atan_inv( $MBI->_new(239),$n);
2690
+ my ($c,$d) = $self->_atan_inv( $MBI->_new(1023),$n);
2691
+ my ($e,$f) = $self->_atan_inv( $MBI->_new(5832),$n);
2692
+ my ($g,$h) = $self->_atan_inv( $MBI->_new(110443),$n);
2693
+ my ($i,$j) = $self->_atan_inv( $MBI->_new(4841182),$n);
2694
+ my ($k,$l) = $self->_atan_inv( $MBI->_new(6826318),$n);
2695
+
2696
+ $MBI->_mul($a, $MBI->_new(732));
2697
+ $MBI->_mul($c, $MBI->_new(128));
2698
+ $MBI->_mul($e, $MBI->_new(272));
2699
+ $MBI->_mul($g, $MBI->_new(48));
2700
+ $MBI->_mul($i, $MBI->_new(48));
2701
+ $MBI->_mul($k, $MBI->_new(400));
2702
+
2703
+ my $x = $self->bone(); $x->{_m} = $a; my $x_d = $self->bone(); $x_d->{_m} = $b;
2704
+ my $y = $self->bone(); $y->{_m} = $c; my $y_d = $self->bone(); $y_d->{_m} = $d;
2705
+ my $z = $self->bone(); $z->{_m} = $e; my $z_d = $self->bone(); $z_d->{_m} = $f;
2706
+ my $u = $self->bone(); $u->{_m} = $g; my $u_d = $self->bone(); $u_d->{_m} = $h;
2707
+ my $v = $self->bone(); $v->{_m} = $i; my $v_d = $self->bone(); $v_d->{_m} = $j;
2708
+ my $w = $self->bone(); $w->{_m} = $k; my $w_d = $self->bone(); $w_d->{_m} = $l;
2709
+ $x->bdiv($x_d, $n);
2710
+ $y->bdiv($y_d, $n);
2711
+ $z->bdiv($z_d, $n);
2712
+ $u->bdiv($u_d, $n);
2713
+ $v->bdiv($v_d, $n);
2714
+ $w->bdiv($w_d, $n);
2715
+
2716
+ delete $x->{_a}; delete $y->{_a}; delete $z->{_a};
2717
+ delete $u->{_a}; delete $v->{_a}; delete $w->{_a};
2718
+ $x->badd($y)->bsub($z)->badd($u)->bsub($v)->bsub($w);
2719
+
2720
+ $x->bround($n-4);
2721
+ delete $x->{_a} if $fallback == 1;
2722
+ $x;
2723
+ }
2724
+
2725
+ sub bcos
2726
+ {
2727
+ # Calculate a cosinus of x.
2728
+ my ($self,$x,@r) = ref($_[0]) ? (ref($_[0]),@_) : objectify(1,@_);
2729
+
2730
+ # Taylor: x^2 x^4 x^6 x^8
2731
+ # cos = 1 - --- + --- - --- + --- ...
2732
+ # 2! 4! 6! 8!
2733
+
2734
+ # we need to limit the accuracy to protect against overflow
2735
+ my $fallback = 0;
2736
+ my ($scale,@params);
2737
+ ($x,@params) = $x->_find_round_parameters(@r);
2738
+
2739
+ # constant object or error in _find_round_parameters?
2740
+ return $x if $x->modify('bcos') || $x->is_nan();
2741
+
2742
+ return $x->bone(@r) if $x->is_zero();
2743
+
2744
+ # no rounding at all, so must use fallback
2745
+ if (scalar @params == 0)
2746
+ {
2747
+ # simulate old behaviour
2748
+ $params[0] = $self->div_scale(); # and round to it as accuracy
2749
+ $params[1] = undef; # disable P
2750
+ $scale = $params[0]+4; # at least four more for proper round
2751
+ $params[2] = $r[2]; # round mode by caller or undef
2752
+ $fallback = 1; # to clear a/p afterwards
2753
+ }
2754
+ else
2755
+ {
2756
+ # the 4 below is empirical, and there might be cases where it is not
2757
+ # enough...
2758
+ $scale = abs($params[0] || $params[1]) + 4; # take whatever is defined
2759
+ }
2760
+
2761
+ # when user set globals, they would interfere with our calculation, so
2762
+ # disable them and later re-enable them
2763
+ no strict 'refs';
2764
+ my $abr = "$self\::accuracy"; my $ab = $$abr; $$abr = undef;
2765
+ my $pbr = "$self\::precision"; my $pb = $$pbr; $$pbr = undef;
2766
+ # we also need to disable any set A or P on $x (_find_round_parameters took
2767
+ # them already into account), since these would interfere, too
2768
+ delete $x->{_a}; delete $x->{_p};
2769
+ # need to disable $upgrade in BigInt, to avoid deep recursion
2770
+ local $Math::BigInt::upgrade = undef;
2771
+
2772
+ my $last = 0;
2773
+ my $over = $x * $x; # X ^ 2
2774
+ my $x2 = $over->copy(); # X ^ 2; difference between terms
2775
+ my $sign = 1; # start with -=
2776
+ my $below = $self->new(2); my $factorial = $self->new(3);
2777
+ $x->bone(); delete $x->{_a}; delete $x->{_p};
2778
+
2779
+ my $limit = $self->new("1E-". ($scale-1));
2780
+ #my $steps = 0;
2781
+ while (3 < 5)
2782
+ {
2783
+ # we calculate the next term, and add it to the last
2784
+ # when the next term is below our limit, it won't affect the outcome
2785
+ # anymore, so we stop:
2786
+ my $next = $over->copy()->bdiv($below,$scale);
2787
+ last if $next->bacmp($limit) <= 0;
2788
+
2789
+ if ($sign == 0)
2790
+ {
2791
+ $x->badd($next);
2792
+ }
2793
+ else
2794
+ {
2795
+ $x->bsub($next);
2796
+ }
2797
+ $sign = 1-$sign; # alternate
2798
+ # calculate things for the next term
2799
+ $over->bmul($x2); # $x*$x
2800
+ $below->bmul($factorial); $factorial->binc(); # n*(n+1)
2801
+ $below->bmul($factorial); $factorial->binc(); # n*(n+1)
2802
+ }
2803
+
2804
+ # shortcut to not run through _find_round_parameters again
2805
+ if (defined $params[0])
2806
+ {
2807
+ $x->bround($params[0],$params[2]); # then round accordingly
2808
+ }
2809
+ else
2810
+ {
2811
+ $x->bfround($params[1],$params[2]); # then round accordingly
2812
+ }
2813
+ if ($fallback)
2814
+ {
2815
+ # clear a/p after round, since user did not request it
2816
+ delete $x->{_a}; delete $x->{_p};
2817
+ }
2818
+ # restore globals
2819
+ $$abr = $ab; $$pbr = $pb;
2820
+ $x;
2821
+ }
2822
+
2823
+ sub bsin
2824
+ {
2825
+ # Calculate a sinus of x.
2826
+ my ($self,$x,@r) = ref($_[0]) ? (ref($_[0]),@_) : objectify(1,@_);
2827
+
2828
+ # taylor: x^3 x^5 x^7 x^9
2829
+ # sin = x - --- + --- - --- + --- ...
2830
+ # 3! 5! 7! 9!
2831
+
2832
+ # we need to limit the accuracy to protect against overflow
2833
+ my $fallback = 0;
2834
+ my ($scale,@params);
2835
+ ($x,@params) = $x->_find_round_parameters(@r);
2836
+
2837
+ # constant object or error in _find_round_parameters?
2838
+ return $x if $x->modify('bsin') || $x->is_nan();
2839
+
2840
+ return $x->bzero(@r) if $x->is_zero();
2841
+
2842
+ # no rounding at all, so must use fallback
2843
+ if (scalar @params == 0)
2844
+ {
2845
+ # simulate old behaviour
2846
+ $params[0] = $self->div_scale(); # and round to it as accuracy
2847
+ $params[1] = undef; # disable P
2848
+ $scale = $params[0]+4; # at least four more for proper round
2849
+ $params[2] = $r[2]; # round mode by caller or undef
2850
+ $fallback = 1; # to clear a/p afterwards
2851
+ }
2852
+ else
2853
+ {
2854
+ # the 4 below is empirical, and there might be cases where it is not
2855
+ # enough...
2856
+ $scale = abs($params[0] || $params[1]) + 4; # take whatever is defined
2857
+ }
2858
+
2859
+ # when user set globals, they would interfere with our calculation, so
2860
+ # disable them and later re-enable them
2861
+ no strict 'refs';
2862
+ my $abr = "$self\::accuracy"; my $ab = $$abr; $$abr = undef;
2863
+ my $pbr = "$self\::precision"; my $pb = $$pbr; $$pbr = undef;
2864
+ # we also need to disable any set A or P on $x (_find_round_parameters took
2865
+ # them already into account), since these would interfere, too
2866
+ delete $x->{_a}; delete $x->{_p};
2867
+ # need to disable $upgrade in BigInt, to avoid deep recursion
2868
+ local $Math::BigInt::upgrade = undef;
2869
+
2870
+ my $last = 0;
2871
+ my $over = $x * $x; # X ^ 2
2872
+ my $x2 = $over->copy(); # X ^ 2; difference between terms
2873
+ $over->bmul($x); # X ^ 3 as starting value
2874
+ my $sign = 1; # start with -=
2875
+ my $below = $self->new(6); my $factorial = $self->new(4);
2876
+ delete $x->{_a}; delete $x->{_p};
2877
+
2878
+ my $limit = $self->new("1E-". ($scale-1));
2879
+ #my $steps = 0;
2880
+ while (3 < 5)
2881
+ {
2882
+ # we calculate the next term, and add it to the last
2883
+ # when the next term is below our limit, it won't affect the outcome
2884
+ # anymore, so we stop:
2885
+ my $next = $over->copy()->bdiv($below,$scale);
2886
+ last if $next->bacmp($limit) <= 0;
2887
+
2888
+ if ($sign == 0)
2889
+ {
2890
+ $x->badd($next);
2891
+ }
2892
+ else
2893
+ {
2894
+ $x->bsub($next);
2895
+ }
2896
+ $sign = 1-$sign; # alternate
2897
+ # calculate things for the next term
2898
+ $over->bmul($x2); # $x*$x
2899
+ $below->bmul($factorial); $factorial->binc(); # n*(n+1)
2900
+ $below->bmul($factorial); $factorial->binc(); # n*(n+1)
2901
+ }
2902
+
2903
+ # shortcut to not run through _find_round_parameters again
2904
+ if (defined $params[0])
2905
+ {
2906
+ $x->bround($params[0],$params[2]); # then round accordingly
2907
+ }
2908
+ else
2909
+ {
2910
+ $x->bfround($params[1],$params[2]); # then round accordingly
2911
+ }
2912
+ if ($fallback)
2913
+ {
2914
+ # clear a/p after round, since user did not request it
2915
+ delete $x->{_a}; delete $x->{_p};
2916
+ }
2917
+ # restore globals
2918
+ $$abr = $ab; $$pbr = $pb;
2919
+ $x;
2920
+ }
2921
+
2922
+ sub batan2
2923
+ {
2924
+ # calculate arcus tangens of ($y/$x)
2925
+
2926
+ # set up parameters
2927
+ my ($self,$y,$x,@r) = (ref($_[0]),@_);
2928
+ # objectify is costly, so avoid it
2929
+ if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1])))
2930
+ {
2931
+ ($self,$y,$x,@r) = objectify(2,@_);
2932
+ }
2933
+
2934
+ return $y if $y->modify('batan2');
2935
+
2936
+ return $y->bnan() if ($y->{sign} eq $nan) || ($x->{sign} eq $nan);
2937
+
2938
+ # Y X
2939
+ # 0 0 result is 0
2940
+ # 0 +x result is 0
2941
+ # ? inf result is 0
2942
+ return $y->bzero(@r) if ($x->is_inf('+') && !$y->is_inf()) || ($y->is_zero() && $x->{sign} eq '+');
2943
+
2944
+ # Y X
2945
+ # != 0 -inf result is +- pi
2946
+ if ($x->is_inf() || $y->is_inf())
2947
+ {
2948
+ # calculate PI
2949
+ my $pi = $self->bpi(@r);
2950
+ if ($y->is_inf())
2951
+ {
2952
+ # upgrade to BigRat etc.
2953
+ return $upgrade->new($y)->batan2($upgrade->new($x),@r) if defined $upgrade;
2954
+ if ($x->{sign} eq '-inf')
2955
+ {
2956
+ # calculate 3 pi/4
2957
+ $MBI->_mul($pi->{_m}, $MBI->_new(3));
2958
+ $MBI->_div($pi->{_m}, $MBI->_new(4));
2959
+ }
2960
+ elsif ($x->{sign} eq '+inf')
2961
+ {
2962
+ # calculate pi/4
2963
+ $MBI->_div($pi->{_m}, $MBI->_new(4));
2964
+ }
2965
+ else
2966
+ {
2967
+ # calculate pi/2
2968
+ $MBI->_div($pi->{_m}, $MBI->_new(2));
2969
+ }
2970
+ $y->{sign} = substr($y->{sign},0,1); # keep +/-
2971
+ }
2972
+ # modify $y in place
2973
+ $y->{_m} = $pi->{_m};
2974
+ $y->{_e} = $pi->{_e};
2975
+ $y->{_es} = $pi->{_es};
2976
+ # keep the sign of $y
2977
+ return $y;
2978
+ }
2979
+
2980
+ return $upgrade->new($y)->batan2($upgrade->new($x),@r) if defined $upgrade;
2981
+
2982
+ # Y X
2983
+ # 0 -x result is PI
2984
+ if ($y->is_zero())
2985
+ {
2986
+ # calculate PI
2987
+ my $pi = $self->bpi(@r);
2988
+ # modify $y in place
2989
+ $y->{_m} = $pi->{_m};
2990
+ $y->{_e} = $pi->{_e};
2991
+ $y->{_es} = $pi->{_es};
2992
+ $y->{sign} = '+';
2993
+ return $y;
2994
+ }
2995
+
2996
+ # Y X
2997
+ # +y 0 result is PI/2
2998
+ # -y 0 result is -PI/2
2999
+ if ($x->is_zero())
3000
+ {
3001
+ # calculate PI/2
3002
+ my $pi = $self->bpi(@r);
3003
+ # modify $y in place
3004
+ $y->{_m} = $pi->{_m};
3005
+ $y->{_e} = $pi->{_e};
3006
+ $y->{_es} = $pi->{_es};
3007
+ # -y => -PI/2, +y => PI/2
3008
+ $MBI->_div($y->{_m}, $MBI->_new(2));
3009
+ return $y;
3010
+ }
3011
+
3012
+ # we need to limit the accuracy to protect against overflow
3013
+ my $fallback = 0;
3014
+ my ($scale,@params);
3015
+ ($y,@params) = $y->_find_round_parameters(@r);
3016
+
3017
+ # error in _find_round_parameters?
3018
+ return $y if $y->is_nan();
3019
+
3020
+ # no rounding at all, so must use fallback
3021
+ if (scalar @params == 0)
3022
+ {
3023
+ # simulate old behaviour
3024
+ $params[0] = $self->div_scale(); # and round to it as accuracy
3025
+ $params[1] = undef; # disable P
3026
+ $scale = $params[0]+4; # at least four more for proper round
3027
+ $params[2] = $r[2]; # round mode by caller or undef
3028
+ $fallback = 1; # to clear a/p afterwards
3029
+ }
3030
+ else
3031
+ {
3032
+ # the 4 below is empirical, and there might be cases where it is not
3033
+ # enough...
3034
+ $scale = abs($params[0] || $params[1]) + 4; # take whatever is defined
3035
+ }
3036
+
3037
+ # inlined is_one() && is_one('-')
3038
+ if ($MBI->_is_one($y->{_m}) && $MBI->_is_zero($y->{_e}))
3039
+ {
3040
+ # shortcut: 1 1 result is PI/4
3041
+ # inlined is_one() && is_one('-')
3042
+ if ($MBI->_is_one($x->{_m}) && $MBI->_is_zero($x->{_e}))
3043
+ {
3044
+ # 1,1 => PI/4
3045
+ my $pi_4 = $self->bpi( $scale - 3);
3046
+ # modify $y in place
3047
+ $y->{_m} = $pi_4->{_m};
3048
+ $y->{_e} = $pi_4->{_e};
3049
+ $y->{_es} = $pi_4->{_es};
3050
+ # 1 1 => +
3051
+ # -1 1 => -
3052
+ # 1 -1 => -
3053
+ # -1 -1 => +
3054
+ $y->{sign} = $x->{sign} eq $y->{sign} ? '+' : '-';
3055
+ $MBI->_div($y->{_m}, $MBI->_new(4));
3056
+ return $y;
3057
+ }
3058
+ # shortcut: 1 int(X) result is _atan_inv(X)
3059
+
3060
+ # is integer
3061
+ if ($x->{_es} eq '+')
3062
+ {
3063
+ my $x1 = $MBI->_copy($x->{_m});
3064
+ $MBI->_lsft($x1, $x->{_e},10) unless $MBI->_is_zero($x->{_e});
3065
+
3066
+ my ($a,$b) = $self->_atan_inv($x1, $scale);
3067
+ my $y_sign = $y->{sign};
3068
+ # calculate A/B
3069
+ $y->bone(); $y->{_m} = $a; my $y_d = $self->bone(); $y_d->{_m} = $b;
3070
+ $y->bdiv($y_d, @r);
3071
+ $y->{sign} = $y_sign;
3072
+ return $y;
3073
+ }
3074
+ }
3075
+
3076
+ # handle all other cases
3077
+ # X Y
3078
+ # +x +y 0 to PI/2
3079
+ # -x +y PI/2 to PI
3080
+ # +x -y 0 to -PI/2
3081
+ # -x -y -PI/2 to -PI
3082
+
3083
+ my $y_sign = $y->{sign};
3084
+
3085
+ # divide $x by $y
3086
+ $y->bdiv($x, $scale) unless $x->is_one();
3087
+ $y->batan(@r);
3088
+
3089
+ # restore sign
3090
+ $y->{sign} = $y_sign;
3091
+
3092
+ $y;
3093
+ }
3094
+
3095
+ sub batan
3096
+ {
3097
+ # Calculate a arcus tangens of x.
3098
+ my ($x,@r) = @_;
3099
+ my $self = ref($x);
3100
+
3101
+ # taylor: x^3 x^5 x^7 x^9
3102
+ # atan = x - --- + --- - --- + --- ...
3103
+ # 3 5 7 9
3104
+
3105
+ # we need to limit the accuracy to protect against overflow
3106
+ my $fallback = 0;
3107
+ my ($scale,@params);
3108
+ ($x,@params) = $x->_find_round_parameters(@r);
3109
+
3110
+ # constant object or error in _find_round_parameters?
3111
+ return $x if $x->modify('batan') || $x->is_nan();
3112
+
3113
+ if ($x->{sign} =~ /^[+-]inf\z/)
3114
+ {
3115
+ # +inf result is PI/2
3116
+ # -inf result is -PI/2
3117
+ # calculate PI/2
3118
+ my $pi = $self->bpi(@r);
3119
+ # modify $x in place
3120
+ $x->{_m} = $pi->{_m};
3121
+ $x->{_e} = $pi->{_e};
3122
+ $x->{_es} = $pi->{_es};
3123
+ # -y => -PI/2, +y => PI/2
3124
+ $x->{sign} = substr($x->{sign},0,1); # +inf => +
3125
+ $MBI->_div($x->{_m}, $MBI->_new(2));
3126
+ return $x;
3127
+ }
3128
+
3129
+ return $x->bzero(@r) if $x->is_zero();
3130
+
3131
+ # no rounding at all, so must use fallback
3132
+ if (scalar @params == 0)
3133
+ {
3134
+ # simulate old behaviour
3135
+ $params[0] = $self->div_scale(); # and round to it as accuracy
3136
+ $params[1] = undef; # disable P
3137
+ $scale = $params[0]+4; # at least four more for proper round
3138
+ $params[2] = $r[2]; # round mode by caller or undef
3139
+ $fallback = 1; # to clear a/p afterwards
3140
+ }
3141
+ else
3142
+ {
3143
+ # the 4 below is empirical, and there might be cases where it is not
3144
+ # enough...
3145
+ $scale = abs($params[0] || $params[1]) + 4; # take whatever is defined
3146
+ }
3147
+
3148
+ # 1 or -1 => PI/4
3149
+ # inlined is_one() && is_one('-')
3150
+ if ($MBI->_is_one($x->{_m}) && $MBI->_is_zero($x->{_e}))
3151
+ {
3152
+ my $pi = $self->bpi($scale - 3);
3153
+ # modify $x in place
3154
+ $x->{_m} = $pi->{_m};
3155
+ $x->{_e} = $pi->{_e};
3156
+ $x->{_es} = $pi->{_es};
3157
+ # leave the sign of $x alone (+1 => +PI/4, -1 => -PI/4)
3158
+ $MBI->_div($x->{_m}, $MBI->_new(4));
3159
+ return $x;
3160
+ }
3161
+
3162
+ # This series is only valid if -1 < x < 1, so for other x we need to
3163
+ # to calculate PI/2 - atan(1/x):
3164
+ my $one = $MBI->_new(1);
3165
+ my $pi = undef;
3166
+ if ($x->{_es} eq '+' && ($MBI->_acmp($x->{_m},$one) >= 0))
3167
+ {
3168
+ # calculate PI/2
3169
+ $pi = $self->bpi($scale - 3);
3170
+ $MBI->_div($pi->{_m}, $MBI->_new(2));
3171
+ # calculate 1/$x:
3172
+ my $x_copy = $x->copy();
3173
+ # modify $x in place
3174
+ $x->bone(); $x->bdiv($x_copy,$scale);
3175
+ }
3176
+
3177
+ # when user set globals, they would interfere with our calculation, so
3178
+ # disable them and later re-enable them
3179
+ no strict 'refs';
3180
+ my $abr = "$self\::accuracy"; my $ab = $$abr; $$abr = undef;
3181
+ my $pbr = "$self\::precision"; my $pb = $$pbr; $$pbr = undef;
3182
+ # we also need to disable any set A or P on $x (_find_round_parameters took
3183
+ # them already into account), since these would interfere, too
3184
+ delete $x->{_a}; delete $x->{_p};
3185
+ # need to disable $upgrade in BigInt, to avoid deep recursion
3186
+ local $Math::BigInt::upgrade = undef;
3187
+
3188
+ my $last = 0;
3189
+ my $over = $x * $x; # X ^ 2
3190
+ my $x2 = $over->copy(); # X ^ 2; difference between terms
3191
+ $over->bmul($x); # X ^ 3 as starting value
3192
+ my $sign = 1; # start with -=
3193
+ my $below = $self->new(3);
3194
+ my $two = $self->new(2);
3195
+ delete $x->{_a}; delete $x->{_p};
3196
+
3197
+ my $limit = $self->new("1E-". ($scale-1));
3198
+ #my $steps = 0;
3199
+ while (3 < 5)
3200
+ {
3201
+ # we calculate the next term, and add it to the last
3202
+ # when the next term is below our limit, it won't affect the outcome
3203
+ # anymore, so we stop:
3204
+ my $next = $over->copy()->bdiv($below,$scale);
3205
+ last if $next->bacmp($limit) <= 0;
3206
+
3207
+ if ($sign == 0)
3208
+ {
3209
+ $x->badd($next);
3210
+ }
3211
+ else
3212
+ {
3213
+ $x->bsub($next);
3214
+ }
3215
+ $sign = 1-$sign; # alternate
3216
+ # calculate things for the next term
3217
+ $over->bmul($x2); # $x*$x
3218
+ $below->badd($two); # n += 2
3219
+ }
3220
+
3221
+ if (defined $pi)
3222
+ {
3223
+ my $x_copy = $x->copy();
3224
+ # modify $x in place
3225
+ $x->{_m} = $pi->{_m};
3226
+ $x->{_e} = $pi->{_e};
3227
+ $x->{_es} = $pi->{_es};
3228
+ # PI/2 - $x
3229
+ $x->bsub($x_copy);
3230
+ }
3231
+
3232
+ # shortcut to not run through _find_round_parameters again
3233
+ if (defined $params[0])
3234
+ {
3235
+ $x->bround($params[0],$params[2]); # then round accordingly
3236
+ }
3237
+ else
3238
+ {
3239
+ $x->bfround($params[1],$params[2]); # then round accordingly
3240
+ }
3241
+ if ($fallback)
3242
+ {
3243
+ # clear a/p after round, since user did not request it
3244
+ delete $x->{_a}; delete $x->{_p};
3245
+ }
3246
+ # restore globals
3247
+ $$abr = $ab; $$pbr = $pb;
3248
+ $x;
3249
+ }
3250
+
3251
+ ###############################################################################
3252
+ # rounding functions
3253
+
3254
+ sub bfround
3255
+ {
3256
+ # precision: round to the $Nth digit left (+$n) or right (-$n) from the '.'
3257
+ # $n == 0 means round to integer
3258
+ # expects and returns normalized numbers!
3259
+ my $x = shift; my $self = ref($x) || $x; $x = $self->new(shift) if !ref($x);
3260
+
3261
+ my ($scale,$mode) = $x->_scale_p(@_);
3262
+ return $x if !defined $scale || $x->modify('bfround'); # no-op
3263
+
3264
+ # never round a 0, +-inf, NaN
3265
+ if ($x->is_zero())
3266
+ {
3267
+ $x->{_p} = $scale if !defined $x->{_p} || $x->{_p} < $scale; # -3 < -2
3268
+ return $x;
3269
+ }
3270
+ return $x if $x->{sign} !~ /^[+-]$/;
3271
+
3272
+ # don't round if x already has lower precision
3273
+ return $x if (defined $x->{_p} && $x->{_p} < 0 && $scale < $x->{_p});
3274
+
3275
+ $x->{_p} = $scale; # remember round in any case
3276
+ delete $x->{_a}; # and clear A
3277
+ if ($scale < 0)
3278
+ {
3279
+ # round right from the '.'
3280
+
3281
+ return $x if $x->{_es} eq '+'; # e >= 0 => nothing to round
3282
+
3283
+ $scale = -$scale; # positive for simplicity
3284
+ my $len = $MBI->_len($x->{_m}); # length of mantissa
3285
+
3286
+ # the following poses a restriction on _e, but if _e is bigger than a
3287
+ # scalar, you got other problems (memory etc) anyway
3288
+ my $dad = -(0+ ($x->{_es}.$MBI->_num($x->{_e}))); # digits after dot
3289
+ my $zad = 0; # zeros after dot
3290
+ $zad = $dad - $len if (-$dad < -$len); # for 0.00..00xxx style
3291
+
3292
+ # p rint "scale $scale dad $dad zad $zad len $len\n";
3293
+ # number bsstr len zad dad
3294
+ # 0.123 123e-3 3 0 3
3295
+ # 0.0123 123e-4 3 1 4
3296
+ # 0.001 1e-3 1 2 3
3297
+ # 1.23 123e-2 3 0 2
3298
+ # 1.2345 12345e-4 5 0 4
3299
+
3300
+ # do not round after/right of the $dad
3301
+ return $x if $scale > $dad; # 0.123, scale >= 3 => exit
3302
+
3303
+ # round to zero if rounding inside the $zad, but not for last zero like:
3304
+ # 0.0065, scale -2, round last '0' with following '65' (scale == zad case)
3305
+ return $x->bzero() if $scale < $zad;
3306
+ if ($scale == $zad) # for 0.006, scale -3 and trunc
3307
+ {
3308
+ $scale = -$len;
3309
+ }
3310
+ else
3311
+ {
3312
+ # adjust round-point to be inside mantissa
3313
+ if ($zad != 0)
3314
+ {
3315
+ $scale = $scale-$zad;
3316
+ }
3317
+ else
3318
+ {
3319
+ my $dbd = $len - $dad; $dbd = 0 if $dbd < 0; # digits before dot
3320
+ $scale = $dbd+$scale;
3321
+ }
3322
+ }
3323
+ }
3324
+ else
3325
+ {
3326
+ # round left from the '.'
3327
+
3328
+ # 123 => 100 means length(123) = 3 - $scale (2) => 1
3329
+
3330
+ my $dbt = $MBI->_len($x->{_m});
3331
+ # digits before dot
3332
+ my $dbd = $dbt + ($x->{_es} . $MBI->_num($x->{_e}));
3333
+ # should be the same, so treat it as this
3334
+ $scale = 1 if $scale == 0;
3335
+ # shortcut if already integer
3336
+ return $x if $scale == 1 && $dbt <= $dbd;
3337
+ # maximum digits before dot
3338
+ ++$dbd;
3339
+
3340
+ if ($scale > $dbd)
3341
+ {
3342
+ # not enough digits before dot, so round to zero
3343
+ return $x->bzero;
3344
+ }
3345
+ elsif ( $scale == $dbd )
3346
+ {
3347
+ # maximum
3348
+ $scale = -$dbt;
3349
+ }
3350
+ else
3351
+ {
3352
+ $scale = $dbd - $scale;
3353
+ }
3354
+ }
3355
+ # pass sign to bround for rounding modes '+inf' and '-inf'
3356
+ my $m = bless { sign => $x->{sign}, value => $x->{_m} }, 'Math::BigInt';
3357
+ $m->bround($scale,$mode);
3358
+ $x->{_m} = $m->{value}; # get our mantissa back
3359
+ $x->bnorm();
3360
+ }
3361
+
3362
+ sub bround
3363
+ {
3364
+ # accuracy: preserve $N digits, and overwrite the rest with 0's
3365
+ my $x = shift; my $self = ref($x) || $x; $x = $self->new(shift) if !ref($x);
3366
+
3367
+ if (($_[0] || 0) < 0)
3368
+ {
3369
+ require Carp; Carp::croak ('bround() needs positive accuracy');
3370
+ }
3371
+
3372
+ my ($scale,$mode) = $x->_scale_a(@_);
3373
+ return $x if !defined $scale || $x->modify('bround'); # no-op
3374
+
3375
+ # scale is now either $x->{_a}, $accuracy, or the user parameter
3376
+ # test whether $x already has lower accuracy, do nothing in this case
3377
+ # but do round if the accuracy is the same, since a math operation might
3378
+ # want to round a number with A=5 to 5 digits afterwards again
3379
+ return $x if defined $x->{_a} && $x->{_a} < $scale;
3380
+
3381
+ # scale < 0 makes no sense
3382
+ # scale == 0 => keep all digits
3383
+ # never round a +-inf, NaN
3384
+ return $x if ($scale <= 0) || $x->{sign} !~ /^[+-]$/;
3385
+
3386
+ # 1: never round a 0
3387
+ # 2: if we should keep more digits than the mantissa has, do nothing
3388
+ if ($x->is_zero() || $MBI->_len($x->{_m}) <= $scale)
3389
+ {
3390
+ $x->{_a} = $scale if !defined $x->{_a} || $x->{_a} > $scale;
3391
+ return $x;
3392
+ }
3393
+
3394
+ # pass sign to bround for '+inf' and '-inf' rounding modes
3395
+ my $m = bless { sign => $x->{sign}, value => $x->{_m} }, 'Math::BigInt';
3396
+
3397
+ $m->bround($scale,$mode); # round mantissa
3398
+ $x->{_m} = $m->{value}; # get our mantissa back
3399
+ $x->{_a} = $scale; # remember rounding
3400
+ delete $x->{_p}; # and clear P
3401
+ $x->bnorm(); # del trailing zeros gen. by bround()
3402
+ }
3403
+
3404
+ sub bfloor
3405
+ {
3406
+ # return integer less or equal then $x
3407
+ my ($self,$x,$a,$p,$r) = ref($_[0]) ? (ref($_[0]),@_) : objectify(1,@_);
3408
+
3409
+ return $x if $x->modify('bfloor');
3410
+
3411
+ return $x if $x->{sign} !~ /^[+-]$/; # nan, +inf, -inf
3412
+
3413
+ # if $x has digits after dot
3414
+ if ($x->{_es} eq '-')
3415
+ {
3416
+ $x->{_m} = $MBI->_rsft($x->{_m},$x->{_e},10); # cut off digits after dot
3417
+ $x->{_e} = $MBI->_zero(); # trunc/norm
3418
+ $x->{_es} = '+'; # abs e
3419
+ $MBI->_inc($x->{_m}) if $x->{sign} eq '-'; # increment if negative
3420
+ }
3421
+ $x->round($a,$p,$r);
3422
+ }
3423
+
3424
+ sub bceil
3425
+ {
3426
+ # return integer greater or equal then $x
3427
+ my ($self,$x,$a,$p,$r) = ref($_[0]) ? (ref($_[0]),@_) : objectify(1,@_);
3428
+
3429
+ return $x if $x->modify('bceil');
3430
+ return $x if $x->{sign} !~ /^[+-]$/; # nan, +inf, -inf
3431
+
3432
+ # if $x has digits after dot
3433
+ if ($x->{_es} eq '-')
3434
+ {
3435
+ $x->{_m} = $MBI->_rsft($x->{_m},$x->{_e},10); # cut off digits after dot
3436
+ $x->{_e} = $MBI->_zero(); # trunc/norm
3437
+ $x->{_es} = '+'; # abs e
3438
+ $MBI->_inc($x->{_m}) if $x->{sign} eq '+'; # increment if positive
3439
+ }
3440
+ $x->round($a,$p,$r);
3441
+ }
3442
+
3443
+ sub brsft
3444
+ {
3445
+ # shift right by $y (divide by power of $n)
3446
+
3447
+ # set up parameters
3448
+ my ($self,$x,$y,$n,$a,$p,$r) = (ref($_[0]),@_);
3449
+ # objectify is costly, so avoid it
3450
+ if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1])))
3451
+ {
3452
+ ($self,$x,$y,$n,$a,$p,$r) = objectify(2,@_);
3453
+ }
3454
+
3455
+ return $x if $x->modify('brsft');
3456
+ return $x if $x->{sign} !~ /^[+-]$/; # nan, +inf, -inf
3457
+
3458
+ $n = 2 if !defined $n; $n = $self->new($n);
3459
+
3460
+ # negative amount?
3461
+ return $x->blsft($y->copy()->babs(),$n) if $y->{sign} =~ /^-/;
3462
+
3463
+ # the following call to bdiv() will return either quo or (quo,remainder):
3464
+ $x->bdiv($n->bpow($y),$a,$p,$r,$y);
3465
+ }
3466
+
3467
+ sub blsft
3468
+ {
3469
+ # shift left by $y (multiply by power of $n)
3470
+
3471
+ # set up parameters
3472
+ my ($self,$x,$y,$n,$a,$p,$r) = (ref($_[0]),@_);
3473
+ # objectify is costly, so avoid it
3474
+ if ((!ref($_[0])) || (ref($_[0]) ne ref($_[1])))
3475
+ {
3476
+ ($self,$x,$y,$n,$a,$p,$r) = objectify(2,@_);
3477
+ }
3478
+
3479
+ return $x if $x->modify('blsft');
3480
+ return $x if $x->{sign} !~ /^[+-]$/; # nan, +inf, -inf
3481
+
3482
+ $n = 2 if !defined $n; $n = $self->new($n);
3483
+
3484
+ # negative amount?
3485
+ return $x->brsft($y->copy()->babs(),$n) if $y->{sign} =~ /^-/;
3486
+
3487
+ $x->bmul($n->bpow($y),$a,$p,$r,$y);
3488
+ }
3489
+
3490
+ ###############################################################################
3491
+
3492
+ sub DESTROY
3493
+ {
3494
+ # going through AUTOLOAD for every DESTROY is costly, avoid it by empty sub
3495
+ }
3496
+
3497
+ sub AUTOLOAD
3498
+ {
3499
+ # make fxxx and bxxx both work by selectively mapping fxxx() to MBF::bxxx()
3500
+ # or falling back to MBI::bxxx()
3501
+ my $name = $AUTOLOAD;
3502
+
3503
+ $name =~ s/(.*):://; # split package
3504
+ my $c = $1 || $class;
3505
+ no strict 'refs';
3506
+ $c->import() if $IMPORT == 0;
3507
+ if (!_method_alias($name))
3508
+ {
3509
+ if (!defined $name)
3510
+ {
3511
+ # delayed load of Carp and avoid recursion
3512
+ require Carp;
3513
+ Carp::croak ("$c: Can't call a method without name");
3514
+ }
3515
+ if (!_method_hand_up($name))
3516
+ {
3517
+ # delayed load of Carp and avoid recursion
3518
+ require Carp;
3519
+ Carp::croak ("Can't call $c\-\>$name, not a valid method");
3520
+ }
3521
+ # try one level up, but subst. bxxx() for fxxx() since MBI only got bxxx()
3522
+ $name =~ s/^f/b/;
3523
+ return &{"Math::BigInt"."::$name"}(@_);
3524
+ }
3525
+ my $bname = $name; $bname =~ s/^f/b/;
3526
+ $c .= "::$name";
3527
+ *{$c} = \&{$bname};
3528
+ &{$c}; # uses @_
3529
+ }
3530
+
3531
+ sub exponent
3532
+ {
3533
+ # return a copy of the exponent
3534
+ my ($self,$x) = ref($_[0]) ? (ref($_[0]),$_[0]) : objectify(1,@_);
3535
+
3536
+ if ($x->{sign} !~ /^[+-]$/)
3537
+ {
3538
+ my $s = $x->{sign}; $s =~ s/^[+-]//;
3539
+ return Math::BigInt->new($s); # -inf, +inf => +inf
3540
+ }
3541
+ Math::BigInt->new( $x->{_es} . $MBI->_str($x->{_e}));
3542
+ }
3543
+
3544
+ sub mantissa
3545
+ {
3546
+ # return a copy of the mantissa
3547
+ my ($self,$x) = ref($_[0]) ? (ref($_[0]),$_[0]) : objectify(1,@_);
3548
+
3549
+ if ($x->{sign} !~ /^[+-]$/)
3550
+ {
3551
+ my $s = $x->{sign}; $s =~ s/^[+]//;
3552
+ return Math::BigInt->new($s); # -inf, +inf => +inf
3553
+ }
3554
+ my $m = Math::BigInt->new( $MBI->_str($x->{_m}));
3555
+ $m->bneg() if $x->{sign} eq '-';
3556
+
3557
+ $m;
3558
+ }
3559
+
3560
+ sub parts
3561
+ {
3562
+ # return a copy of both the exponent and the mantissa
3563
+ my ($self,$x) = ref($_[0]) ? (ref($_[0]),$_[0]) : objectify(1,@_);
3564
+
3565
+ if ($x->{sign} !~ /^[+-]$/)
3566
+ {
3567
+ my $s = $x->{sign}; $s =~ s/^[+]//; my $se = $s; $se =~ s/^[-]//;
3568
+ return ($self->new($s),$self->new($se)); # +inf => inf and -inf,+inf => inf
3569
+ }
3570
+ my $m = Math::BigInt->bzero();
3571
+ $m->{value} = $MBI->_copy($x->{_m});
3572
+ $m->bneg() if $x->{sign} eq '-';
3573
+ ($m, Math::BigInt->new( $x->{_es} . $MBI->_num($x->{_e}) ));
3574
+ }
3575
+
3576
+ ##############################################################################
3577
+ # private stuff (internal use only)
3578
+
3579
+ sub import
3580
+ {
3581
+ my $self = shift;
3582
+ my $l = scalar @_;
3583
+ my $lib = ''; my @a;
3584
+ my $lib_kind = 'try';
3585
+ $IMPORT=1;
3586
+ for ( my $i = 0; $i < $l ; $i++)
3587
+ {
3588
+ if ( $_[$i] eq ':constant' )
3589
+ {
3590
+ # This causes overlord er load to step in. 'binary' and 'integer'
3591
+ # are handled by BigInt.
3592
+ overload::constant float => sub { $self->new(shift); };
3593
+ }
3594
+ elsif ($_[$i] eq 'upgrade')
3595
+ {
3596
+ # this causes upgrading
3597
+ $upgrade = $_[$i+1]; # or undef to disable
3598
+ $i++;
3599
+ }
3600
+ elsif ($_[$i] eq 'downgrade')
3601
+ {
3602
+ # this causes downgrading
3603
+ $downgrade = $_[$i+1]; # or undef to disable
3604
+ $i++;
3605
+ }
3606
+ elsif ($_[$i] =~ /^(lib|try|only)\z/)
3607
+ {
3608
+ # alternative library
3609
+ $lib = $_[$i+1] || ''; # default Calc
3610
+ $lib_kind = $1; # lib, try or only
3611
+ $i++;
3612
+ }
3613
+ elsif ($_[$i] eq 'with')
3614
+ {
3615
+ # alternative class for our private parts()
3616
+ # XXX: no longer supported
3617
+ # $MBI = $_[$i+1] || 'Math::BigInt';
3618
+ $i++;
3619
+ }
3620
+ else
3621
+ {
3622
+ push @a, $_[$i];
3623
+ }
3624
+ }
3625
+
3626
+ $lib =~ tr/a-zA-Z0-9,://cd; # restrict to sane characters
3627
+ # let use Math::BigInt lib => 'GMP'; use Math::BigFloat; still work
3628
+ my $mbilib = eval { Math::BigInt->config()->{lib} };
3629
+ if ((defined $mbilib) && ($MBI eq 'Math::BigInt::Calc'))
3630
+ {
3631
+ # MBI already loaded
3632
+ Math::BigInt->import( $lib_kind, "$lib,$mbilib", 'objectify');
3633
+ }
3634
+ else
3635
+ {
3636
+ # MBI not loaded, or with ne "Math::BigInt::Calc"
3637
+ $lib .= ",$mbilib" if defined $mbilib;
3638
+ $lib =~ s/^,//; # don't leave empty
3639
+
3640
+ # replacement library can handle lib statement, but also could ignore it
3641
+
3642
+ # Perl < 5.6.0 dies with "out of memory!" when eval() and ':constant' is
3643
+ # used in the same script, or eval inside import(). So we require MBI:
3644
+ require Math::BigInt;
3645
+ Math::BigInt->import( $lib_kind => $lib, 'objectify' );
3646
+ }
3647
+ if ($@)
3648
+ {
3649
+ require Carp; Carp::croak ("Couldn't load $lib: $! $@");
3650
+ }
3651
+ # find out which one was actually loaded
3652
+ $MBI = Math::BigInt->config()->{lib};
3653
+
3654
+ # register us with MBI to get notified of future lib changes
3655
+ Math::BigInt::_register_callback( $self, sub { $MBI = $_[0]; } );
3656
+
3657
+ $self->export_to_level(1,$self,@a); # export wanted functions
3658
+ }
3659
+
3660
+ sub bnorm
3661
+ {
3662
+ # adjust m and e so that m is smallest possible
3663
+ my ($self,$x) = ref($_[0]) ? (undef,$_[0]) : objectify(1,@_);
3664
+
3665
+ return $x if $x->{sign} !~ /^[+-]$/; # inf, nan etc
3666
+
3667
+ my $zeros = $MBI->_zeros($x->{_m}); # correct for trailing zeros
3668
+ if ($zeros != 0)
3669
+ {
3670
+ my $z = $MBI->_new($zeros);
3671
+ $x->{_m} = $MBI->_rsft ($x->{_m}, $z, 10);
3672
+ if ($x->{_es} eq '-')
3673
+ {
3674
+ if ($MBI->_acmp($x->{_e},$z) >= 0)
3675
+ {
3676
+ $x->{_e} = $MBI->_sub ($x->{_e}, $z);
3677
+ $x->{_es} = '+' if $MBI->_is_zero($x->{_e});
3678
+ }
3679
+ else
3680
+ {
3681
+ $x->{_e} = $MBI->_sub ( $MBI->_copy($z), $x->{_e});
3682
+ $x->{_es} = '+';
3683
+ }
3684
+ }
3685
+ else
3686
+ {
3687
+ $x->{_e} = $MBI->_add ($x->{_e}, $z);
3688
+ }
3689
+ }
3690
+ else
3691
+ {
3692
+ # $x can only be 0Ey if there are no trailing zeros ('0' has 0 trailing
3693
+ # zeros). So, for something like 0Ey, set y to 1, and -0 => +0
3694
+ $x->{sign} = '+', $x->{_es} = '+', $x->{_e} = $MBI->_one()
3695
+ if $MBI->_is_zero($x->{_m});
3696
+ }
3697
+
3698
+ $x; # MBI bnorm is no-op, so dont call it
3699
+ }
3700
+
3701
+ ##############################################################################
3702
+
3703
+ sub as_hex
3704
+ {
3705
+ # return number as hexadecimal string (only for integers defined)
3706
+ my ($self,$x) = ref($_[0]) ? (ref($_[0]),$_[0]) : objectify(1,@_);
3707
+
3708
+ return $x->bstr() if $x->{sign} !~ /^[+-]$/; # inf, nan etc
3709
+ return '0x0' if $x->is_zero();
3710
+
3711
+ return $nan if $x->{_es} ne '+'; # how to do 1e-1 in hex!?
3712
+
3713
+ my $z = $MBI->_copy($x->{_m});
3714
+ if (! $MBI->_is_zero($x->{_e})) # > 0
3715
+ {
3716
+ $MBI->_lsft( $z, $x->{_e},10);
3717
+ }
3718
+ $z = Math::BigInt->new( $x->{sign} . $MBI->_num($z));
3719
+ $z->as_hex();
3720
+ }
3721
+
3722
+ sub as_bin
3723
+ {
3724
+ # return number as binary digit string (only for integers defined)
3725
+ my ($self,$x) = ref($_[0]) ? (ref($_[0]),$_[0]) : objectify(1,@_);
3726
+
3727
+ return $x->bstr() if $x->{sign} !~ /^[+-]$/; # inf, nan etc
3728
+ return '0b0' if $x->is_zero();
3729
+
3730
+ return $nan if $x->{_es} ne '+'; # how to do 1e-1 in hex!?
3731
+
3732
+ my $z = $MBI->_copy($x->{_m});
3733
+ if (! $MBI->_is_zero($x->{_e})) # > 0
3734
+ {
3735
+ $MBI->_lsft( $z, $x->{_e},10);
3736
+ }
3737
+ $z = Math::BigInt->new( $x->{sign} . $MBI->_num($z));
3738
+ $z->as_bin();
3739
+ }
3740
+
3741
+ sub as_oct
3742
+ {
3743
+ # return number as octal digit string (only for integers defined)
3744
+ my ($self,$x) = ref($_[0]) ? (ref($_[0]),$_[0]) : objectify(1,@_);
3745
+
3746
+ return $x->bstr() if $x->{sign} !~ /^[+-]$/; # inf, nan etc
3747
+ return '0' if $x->is_zero();
3748
+
3749
+ return $nan if $x->{_es} ne '+'; # how to do 1e-1 in hex!?
3750
+
3751
+ my $z = $MBI->_copy($x->{_m});
3752
+ if (! $MBI->_is_zero($x->{_e})) # > 0
3753
+ {
3754
+ $MBI->_lsft( $z, $x->{_e},10);
3755
+ }
3756
+ $z = Math::BigInt->new( $x->{sign} . $MBI->_num($z));
3757
+ $z->as_oct();
3758
+ }
3759
+
3760
+ sub as_number
3761
+ {
3762
+ # return copy as a bigint representation of this BigFloat number
3763
+ my ($self,$x) = ref($_[0]) ? (ref($_[0]),$_[0]) : objectify(1,@_);
3764
+
3765
+ return $x if $x->modify('as_number');
3766
+
3767
+ if (!$x->isa('Math::BigFloat'))
3768
+ {
3769
+ # if the object can as_number(), use it
3770
+ return $x->as_number() if $x->can('as_number');
3771
+ # otherwise, get us a float and then a number
3772
+ $x = $x->can('as_float') ? $x->as_float() : $self->new(0+"$x");
3773
+ }
3774
+
3775
+ return Math::BigInt->binf($x->sign()) if $x->is_inf();
3776
+ return Math::BigInt->bnan() if $x->is_nan();
3777
+
3778
+ my $z = $MBI->_copy($x->{_m});
3779
+ if ($x->{_es} eq '-') # < 0
3780
+ {
3781
+ $MBI->_rsft( $z, $x->{_e},10);
3782
+ }
3783
+ elsif (! $MBI->_is_zero($x->{_e})) # > 0
3784
+ {
3785
+ $MBI->_lsft( $z, $x->{_e},10);
3786
+ }
3787
+ $z = Math::BigInt->new( $x->{sign} . $MBI->_str($z));
3788
+ $z;
3789
+ }
3790
+
3791
+ sub length
3792
+ {
3793
+ my $x = shift;
3794
+ my $class = ref($x) || $x;
3795
+ $x = $class->new(shift) unless ref($x);
3796
+
3797
+ return 1 if $MBI->_is_zero($x->{_m});
3798
+
3799
+ my $len = $MBI->_len($x->{_m});
3800
+ $len += $MBI->_num($x->{_e}) if $x->{_es} eq '+';
3801
+ if (wantarray())
3802
+ {
3803
+ my $t = 0;
3804
+ $t = $MBI->_num($x->{_e}) if $x->{_es} eq '-';
3805
+ return ($len, $t);
3806
+ }
3807
+ $len;
3808
+ }
3809
+
3810
+ 1;
3811
+ __END__
3812
+
3813
+ =head1 NAME
3814
+
3815
+ Math::BigFloat - Arbitrary size floating point math package
3816
+
3817
+ =head1 SYNOPSIS
3818
+
3819
+ use Math::BigFloat;
3820
+
3821
+ # Number creation
3822
+ my $x = Math::BigFloat->new($str); # defaults to 0
3823
+ my $y = $x->copy(); # make a true copy
3824
+ my $nan = Math::BigFloat->bnan(); # create a NotANumber
3825
+ my $zero = Math::BigFloat->bzero(); # create a +0
3826
+ my $inf = Math::BigFloat->binf(); # create a +inf
3827
+ my $inf = Math::BigFloat->binf('-'); # create a -inf
3828
+ my $one = Math::BigFloat->bone(); # create a +1
3829
+ my $mone = Math::BigFloat->bone('-'); # create a -1
3830
+
3831
+ my $pi = Math::BigFloat->bpi(100); # PI to 100 digits
3832
+
3833
+ # the following examples compute their result to 100 digits accuracy:
3834
+ my $cos = Math::BigFloat->new(1)->bcos(100); # cosinus(1)
3835
+ my $sin = Math::BigFloat->new(1)->bsin(100); # sinus(1)
3836
+ my $atan = Math::BigFloat->new(1)->batan(100); # arcus tangens(1)
3837
+
3838
+ my $atan2 = Math::BigFloat->new( 1 )->batan2( 1 ,100); # batan(1)
3839
+ my $atan2 = Math::BigFloat->new( 1 )->batan2( 8 ,100); # batan(1/8)
3840
+ my $atan2 = Math::BigFloat->new( -2 )->batan2( 1 ,100); # batan(-2)
3841
+
3842
+ # Testing
3843
+ $x->is_zero(); # true if arg is +0
3844
+ $x->is_nan(); # true if arg is NaN
3845
+ $x->is_one(); # true if arg is +1
3846
+ $x->is_one('-'); # true if arg is -1
3847
+ $x->is_odd(); # true if odd, false for even
3848
+ $x->is_even(); # true if even, false for odd
3849
+ $x->is_pos(); # true if >= 0
3850
+ $x->is_neg(); # true if < 0
3851
+ $x->is_inf(sign); # true if +inf, or -inf (default is '+')
3852
+
3853
+ $x->bcmp($y); # compare numbers (undef,<0,=0,>0)
3854
+ $x->bacmp($y); # compare absolutely (undef,<0,=0,>0)
3855
+ $x->sign(); # return the sign, either +,- or NaN
3856
+ $x->digit($n); # return the nth digit, counting from right
3857
+ $x->digit(-$n); # return the nth digit, counting from left
3858
+
3859
+ # The following all modify their first argument. If you want to preserve
3860
+ # $x, use $z = $x->copy()->bXXX($y); See under L<CAVEATS> for why this is
3861
+ # necessary when mixing $a = $b assignments with non-overloaded math.
3862
+
3863
+ # set
3864
+ $x->bzero(); # set $i to 0
3865
+ $x->bnan(); # set $i to NaN
3866
+ $x->bone(); # set $x to +1
3867
+ $x->bone('-'); # set $x to -1
3868
+ $x->binf(); # set $x to inf
3869
+ $x->binf('-'); # set $x to -inf
3870
+
3871
+ $x->bneg(); # negation
3872
+ $x->babs(); # absolute value
3873
+ $x->bnorm(); # normalize (no-op)
3874
+ $x->bnot(); # two's complement (bit wise not)
3875
+ $x->binc(); # increment x by 1
3876
+ $x->bdec(); # decrement x by 1
3877
+
3878
+ $x->badd($y); # addition (add $y to $x)
3879
+ $x->bsub($y); # subtraction (subtract $y from $x)
3880
+ $x->bmul($y); # multiplication (multiply $x by $y)
3881
+ $x->bdiv($y); # divide, set $x to quotient
3882
+ # return (quo,rem) or quo if scalar
3883
+
3884
+ $x->bmod($y); # modulus ($x % $y)
3885
+ $x->bpow($y); # power of arguments ($x ** $y)
3886
+ $x->bmodpow($exp,$mod); # modular exponentiation (($num**$exp) % $mod))
3887
+ $x->blsft($y, $n); # left shift by $y places in base $n
3888
+ $x->brsft($y, $n); # right shift by $y places in base $n
3889
+ # returns (quo,rem) or quo if in scalar context
3890
+
3891
+ $x->blog(); # logarithm of $x to base e (Euler's number)
3892
+ $x->blog($base); # logarithm of $x to base $base (f.i. 2)
3893
+ $x->bexp(); # calculate e ** $x where e is Euler's number
3894
+
3895
+ $x->band($y); # bit-wise and
3896
+ $x->bior($y); # bit-wise inclusive or
3897
+ $x->bxor($y); # bit-wise exclusive or
3898
+ $x->bnot(); # bit-wise not (two's complement)
3899
+
3900
+ $x->bsqrt(); # calculate square-root
3901
+ $x->broot($y); # $y'th root of $x (e.g. $y == 3 => cubic root)
3902
+ $x->bfac(); # factorial of $x (1*2*3*4*..$x)
3903
+
3904
+ $x->bround($N); # accuracy: preserve $N digits
3905
+ $x->bfround($N); # precision: round to the $Nth digit
3906
+
3907
+ $x->bfloor(); # return integer less or equal than $x
3908
+ $x->bceil(); # return integer greater or equal than $x
3909
+
3910
+ # The following do not modify their arguments:
3911
+
3912
+ bgcd(@values); # greatest common divisor
3913
+ blcm(@values); # lowest common multiplicator
3914
+
3915
+ $x->bstr(); # return string
3916
+ $x->bsstr(); # return string in scientific notation
3917
+
3918
+ $x->as_int(); # return $x as BigInt
3919
+ $x->exponent(); # return exponent as BigInt
3920
+ $x->mantissa(); # return mantissa as BigInt
3921
+ $x->parts(); # return (mantissa,exponent) as BigInt
3922
+
3923
+ $x->length(); # number of digits (w/o sign and '.')
3924
+ ($l,$f) = $x->length(); # number of digits, and length of fraction
3925
+
3926
+ $x->precision(); # return P of $x (or global, if P of $x undef)
3927
+ $x->precision($n); # set P of $x to $n
3928
+ $x->accuracy(); # return A of $x (or global, if A of $x undef)
3929
+ $x->accuracy($n); # set A $x to $n
3930
+
3931
+ # these get/set the appropriate global value for all BigFloat objects
3932
+ Math::BigFloat->precision(); # Precision
3933
+ Math::BigFloat->accuracy(); # Accuracy
3934
+ Math::BigFloat->round_mode(); # rounding mode
3935
+
3936
+ =head1 DESCRIPTION
3937
+
3938
+ All operators (including basic math operations) are overloaded if you
3939
+ declare your big floating point numbers as
3940
+
3941
+ $i = new Math::BigFloat '12_3.456_789_123_456_789E-2';
3942
+
3943
+ Operations with overloaded operators preserve the arguments, which is
3944
+ exactly what you expect.
3945
+
3946
+ =head2 Canonical notation
3947
+
3948
+ Input to these routines are either BigFloat objects, or strings of the
3949
+ following four forms:
3950
+
3951
+ =over 2
3952
+
3953
+ =item *
3954
+
3955
+ C</^[+-]\d+$/>
3956
+
3957
+ =item *
3958
+
3959
+ C</^[+-]\d+\.\d*$/>
3960
+
3961
+ =item *
3962
+
3963
+ C</^[+-]\d+E[+-]?\d+$/>
3964
+
3965
+ =item *
3966
+
3967
+ C</^[+-]\d*\.\d+E[+-]?\d+$/>
3968
+
3969
+ =back
3970
+
3971
+ all with optional leading and trailing zeros and/or spaces. Additionally,
3972
+ numbers are allowed to have an underscore between any two digits.
3973
+
3974
+ Empty strings as well as other illegal numbers results in 'NaN'.
3975
+
3976
+ bnorm() on a BigFloat object is now effectively a no-op, since the numbers
3977
+ are always stored in normalized form. On a string, it creates a BigFloat
3978
+ object.
3979
+
3980
+ =head2 Output
3981
+
3982
+ Output values are BigFloat objects (normalized), except for bstr() and bsstr().
3983
+
3984
+ The string output will always have leading and trailing zeros stripped and drop
3985
+ a plus sign. C<bstr()> will give you always the form with a decimal point,
3986
+ while C<bsstr()> (s for scientific) gives you the scientific notation.
3987
+
3988
+ Input bstr() bsstr()
3989
+ '-0' '0' '0E1'
3990
+ ' -123 123 123' '-123123123' '-123123123E0'
3991
+ '00.0123' '0.0123' '123E-4'
3992
+ '123.45E-2' '1.2345' '12345E-4'
3993
+ '10E+3' '10000' '1E4'
3994
+
3995
+ Some routines (C<is_odd()>, C<is_even()>, C<is_zero()>, C<is_one()>,
3996
+ C<is_nan()>) return true or false, while others (C<bcmp()>, C<bacmp()>)
3997
+ return either undef, <0, 0 or >0 and are suited for sort.
3998
+
3999
+ Actual math is done by using the class defined with C<< with => Class; >> (which
4000
+ defaults to BigInts) to represent the mantissa and exponent.
4001
+
4002
+ The sign C</^[+-]$/> is stored separately. The string 'NaN' is used to
4003
+ represent the result when input arguments are not numbers, as well as
4004
+ the result of dividing by zero.
4005
+
4006
+ =head2 C<mantissa()>, C<exponent()> and C<parts()>
4007
+
4008
+ C<mantissa()> and C<exponent()> return the said parts of the BigFloat
4009
+ as BigInts such that:
4010
+
4011
+ $m = $x->mantissa();
4012
+ $e = $x->exponent();
4013
+ $y = $m * ( 10 ** $e );
4014
+ print "ok\n" if $x == $y;
4015
+
4016
+ C<< ($m,$e) = $x->parts(); >> is just a shortcut giving you both of them.
4017
+
4018
+ A zero is represented and returned as C<0E1>, B<not> C<0E0> (after Knuth).
4019
+
4020
+ Currently the mantissa is reduced as much as possible, favouring higher
4021
+ exponents over lower ones (e.g. returning 1e7 instead of 10e6 or 10000000e0).
4022
+ This might change in the future, so do not depend on it.
4023
+
4024
+ =head2 Accuracy vs. Precision
4025
+
4026
+ See also: L<Rounding|Rounding>.
4027
+
4028
+ Math::BigFloat supports both precision (rounding to a certain place before or
4029
+ after the dot) and accuracy (rounding to a certain number of digits). For a
4030
+ full documentation, examples and tips on these topics please see the large
4031
+ section about rounding in L<Math::BigInt>.
4032
+
4033
+ Since things like C<sqrt(2)> or C<1 / 3> must presented with a limited
4034
+ accuracy lest a operation consumes all resources, each operation produces
4035
+ no more than the requested number of digits.
4036
+
4037
+ If there is no global precision or accuracy set, B<and> the operation in
4038
+ question was not called with a requested precision or accuracy, B<and> the
4039
+ input $x has no accuracy or precision set, then a fallback parameter will
4040
+ be used. For historical reasons, it is called C<div_scale> and can be accessed
4041
+ via:
4042
+
4043
+ $d = Math::BigFloat->div_scale(); # query
4044
+ Math::BigFloat->div_scale($n); # set to $n digits
4045
+
4046
+ The default value for C<div_scale> is 40.
4047
+
4048
+ In case the result of one operation has more digits than specified,
4049
+ it is rounded. The rounding mode taken is either the default mode, or the one
4050
+ supplied to the operation after the I<scale>:
4051
+
4052
+ $x = Math::BigFloat->new(2);
4053
+ Math::BigFloat->accuracy(5); # 5 digits max
4054
+ $y = $x->copy()->bdiv(3); # will give 0.66667
4055
+ $y = $x->copy()->bdiv(3,6); # will give 0.666667
4056
+ $y = $x->copy()->bdiv(3,6,undef,'odd'); # will give 0.666667
4057
+ Math::BigFloat->round_mode('zero');
4058
+ $y = $x->copy()->bdiv(3,6); # will also give 0.666667
4059
+
4060
+ Note that C<< Math::BigFloat->accuracy() >> and C<< Math::BigFloat->precision() >>
4061
+ set the global variables, and thus B<any> newly created number will be subject
4062
+ to the global rounding B<immediately>. This means that in the examples above, the
4063
+ C<3> as argument to C<bdiv()> will also get an accuracy of B<5>.
4064
+
4065
+ It is less confusing to either calculate the result fully, and afterwards
4066
+ round it explicitly, or use the additional parameters to the math
4067
+ functions like so:
4068
+
4069
+ use Math::BigFloat;
4070
+ $x = Math::BigFloat->new(2);
4071
+ $y = $x->copy()->bdiv(3);
4072
+ print $y->bround(5),"\n"; # will give 0.66667
4073
+
4074
+ or
4075
+
4076
+ use Math::BigFloat;
4077
+ $x = Math::BigFloat->new(2);
4078
+ $y = $x->copy()->bdiv(3,5); # will give 0.66667
4079
+ print "$y\n";
4080
+
4081
+ =head2 Rounding
4082
+
4083
+ =over 2
4084
+
4085
+ =item ffround ( +$scale )
4086
+
4087
+ Rounds to the $scale'th place left from the '.', counting from the dot.
4088
+ The first digit is numbered 1.
4089
+
4090
+ =item ffround ( -$scale )
4091
+
4092
+ Rounds to the $scale'th place right from the '.', counting from the dot.
4093
+
4094
+ =item ffround ( 0 )
4095
+
4096
+ Rounds to an integer.
4097
+
4098
+ =item fround ( +$scale )
4099
+
4100
+ Preserves accuracy to $scale digits from the left (aka significant digits)
4101
+ and pads the rest with zeros. If the number is between 1 and -1, the
4102
+ significant digits count from the first non-zero after the '.'
4103
+
4104
+ =item fround ( -$scale ) and fround ( 0 )
4105
+
4106
+ These are effectively no-ops.
4107
+
4108
+ =back
4109
+
4110
+ All rounding functions take as a second parameter a rounding mode from one of
4111
+ the following: 'even', 'odd', '+inf', '-inf', 'zero', 'trunc' or 'common'.
4112
+
4113
+ The default rounding mode is 'even'. By using
4114
+ C<< Math::BigFloat->round_mode($round_mode); >> you can get and set the default
4115
+ mode for subsequent rounding. The usage of C<$Math::BigFloat::$round_mode> is
4116
+ no longer supported.
4117
+ The second parameter to the round functions then overrides the default
4118
+ temporarily.
4119
+
4120
+ The C<as_number()> function returns a BigInt from a Math::BigFloat. It uses
4121
+ 'trunc' as rounding mode to make it equivalent to:
4122
+
4123
+ $x = 2.5;
4124
+ $y = int($x) + 2;
4125
+
4126
+ You can override this by passing the desired rounding mode as parameter to
4127
+ C<as_number()>:
4128
+
4129
+ $x = Math::BigFloat->new(2.5);
4130
+ $y = $x->as_number('odd'); # $y = 3
4131
+
4132
+ =head1 METHODS
4133
+
4134
+ Math::BigFloat supports all methods that Math::BigInt supports, except it
4135
+ calculates non-integer results when possible. Please see L<Math::BigInt>
4136
+ for a full description of each method. Below are just the most important
4137
+ differences:
4138
+
4139
+ =head2 accuracy
4140
+
4141
+ $x->accuracy(5); # local for $x
4142
+ CLASS->accuracy(5); # global for all members of CLASS
4143
+ # Note: This also applies to new()!
4144
+
4145
+ $A = $x->accuracy(); # read out accuracy that affects $x
4146
+ $A = CLASS->accuracy(); # read out global accuracy
4147
+
4148
+ Set or get the global or local accuracy, aka how many significant digits the
4149
+ results have. If you set a global accuracy, then this also applies to new()!
4150
+
4151
+ Warning! The accuracy I<sticks>, e.g. once you created a number under the
4152
+ influence of C<< CLASS->accuracy($A) >>, all results from math operations with
4153
+ that number will also be rounded.
4154
+
4155
+ In most cases, you should probably round the results explicitly using one of
4156
+ L<round()>, L<bround()> or L<bfround()> or by passing the desired accuracy
4157
+ to the math operation as additional parameter:
4158
+
4159
+ my $x = Math::BigInt->new(30000);
4160
+ my $y = Math::BigInt->new(7);
4161
+ print scalar $x->copy()->bdiv($y, 2); # print 4300
4162
+ print scalar $x->copy()->bdiv($y)->bround(2); # print 4300
4163
+
4164
+ =head2 precision()
4165
+
4166
+ $x->precision(-2); # local for $x, round at the second digit right of the dot
4167
+ $x->precision(2); # ditto, round at the second digit left of the dot
4168
+
4169
+ CLASS->precision(5); # Global for all members of CLASS
4170
+ # This also applies to new()!
4171
+ CLASS->precision(-5); # ditto
4172
+
4173
+ $P = CLASS->precision(); # read out global precision
4174
+ $P = $x->precision(); # read out precision that affects $x
4175
+
4176
+ Note: You probably want to use L<accuracy()> instead. With L<accuracy> you
4177
+ set the number of digits each result should have, with L<precision> you
4178
+ set the place where to round!
4179
+
4180
+ =head2 bexp()
4181
+
4182
+ $x->bexp($accuracy); # calculate e ** X
4183
+
4184
+ Calculates the expression C<e ** $x> where C<e> is Euler's number.
4185
+
4186
+ This method was added in v1.82 of Math::BigInt (April 2007).
4187
+
4188
+ =head2 bnok()
4189
+
4190
+ $x->bnok($y); # x over y (binomial coefficient n over k)
4191
+
4192
+ Calculates the binomial coefficient n over k, also called the "choose"
4193
+ function. The result is equivalent to:
4194
+
4195
+ ( n ) n!
4196
+ | - | = -------
4197
+ ( k ) k!(n-k)!
4198
+
4199
+ This method was added in v1.84 of Math::BigInt (April 2007).
4200
+
4201
+ =head2 bpi()
4202
+
4203
+ print Math::BigFloat->bpi(100), "\n";
4204
+
4205
+ Calculate PI to N digits (including the 3 before the dot). The result is
4206
+ rounded according to the current rounding mode, which defaults to "even".
4207
+
4208
+ This method was added in v1.87 of Math::BigInt (June 2007).
4209
+
4210
+ =head2 bcos()
4211
+
4212
+ my $x = Math::BigFloat->new(1);
4213
+ print $x->bcos(100), "\n";
4214
+
4215
+ Calculate the cosinus of $x, modifying $x in place.
4216
+
4217
+ This method was added in v1.87 of Math::BigInt (June 2007).
4218
+
4219
+ =head2 bsin()
4220
+
4221
+ my $x = Math::BigFloat->new(1);
4222
+ print $x->bsin(100), "\n";
4223
+
4224
+ Calculate the sinus of $x, modifying $x in place.
4225
+
4226
+ This method was added in v1.87 of Math::BigInt (June 2007).
4227
+
4228
+ =head2 batan2()
4229
+
4230
+ my $y = Math::BigFloat->new(2);
4231
+ my $x = Math::BigFloat->new(3);
4232
+ print $y->batan2($x), "\n";
4233
+
4234
+ Calculate the arcus tanges of C<$y> divided by C<$x>, modifying $y in place.
4235
+ See also L<batan()>.
4236
+
4237
+ This method was added in v1.87 of Math::BigInt (June 2007).
4238
+
4239
+ =head2 batan()
4240
+
4241
+ my $x = Math::BigFloat->new(1);
4242
+ print $x->batan(100), "\n";
4243
+
4244
+ Calculate the arcus tanges of $x, modifying $x in place. See also L<batan2()>.
4245
+
4246
+ This method was added in v1.87 of Math::BigInt (June 2007).
4247
+
4248
+ =head2 bmuladd()
4249
+
4250
+ $x->bmuladd($y,$z);
4251
+
4252
+ Multiply $x by $y, and then add $z to the result.
4253
+
4254
+ This method was added in v1.87 of Math::BigInt (June 2007).
4255
+
4256
+ =head1 Autocreating constants
4257
+
4258
+ After C<use Math::BigFloat ':constant'> all the floating point constants
4259
+ in the given scope are converted to C<Math::BigFloat>. This conversion
4260
+ happens at compile time.
4261
+
4262
+ In particular
4263
+
4264
+ perl -MMath::BigFloat=:constant -e 'print 2E-100,"\n"'
4265
+
4266
+ prints the value of C<2E-100>. Note that without conversion of
4267
+ constants the expression 2E-100 will be calculated as normal floating point
4268
+ number.
4269
+
4270
+ Please note that ':constant' does not affect integer constants, nor binary
4271
+ nor hexadecimal constants. Use L<bignum> or L<Math::BigInt> to get this to
4272
+ work.
4273
+
4274
+ =head2 Math library
4275
+
4276
+ Math with the numbers is done (by default) by a module called
4277
+ Math::BigInt::Calc. This is equivalent to saying:
4278
+
4279
+ use Math::BigFloat lib => 'Calc';
4280
+
4281
+ You can change this by using:
4282
+
4283
+ use Math::BigFloat lib => 'GMP';
4284
+
4285
+ B<Note>: General purpose packages should not be explicit about the library
4286
+ to use; let the script author decide which is best.
4287
+
4288
+ Note: The keyword 'lib' will warn when the requested library could not be
4289
+ loaded. To suppress the warning use 'try' instead:
4290
+
4291
+ use Math::BigFloat try => 'GMP';
4292
+
4293
+ If your script works with huge numbers and Calc is too slow for them,
4294
+ you can also for the loading of one of these libraries and if none
4295
+ of them can be used, the code will die:
4296
+
4297
+ use Math::BigFloat only => 'GMP,Pari';
4298
+
4299
+ The following would first try to find Math::BigInt::Foo, then
4300
+ Math::BigInt::Bar, and when this also fails, revert to Math::BigInt::Calc:
4301
+
4302
+ use Math::BigFloat lib => 'Foo,Math::BigInt::Bar';
4303
+
4304
+ See the respective low-level library documentation for further details.
4305
+
4306
+ Please note that Math::BigFloat does B<not> use the denoted library itself,
4307
+ but it merely passes the lib argument to Math::BigInt. So, instead of the need
4308
+ to do:
4309
+
4310
+ use Math::BigInt lib => 'GMP';
4311
+ use Math::BigFloat;
4312
+
4313
+ you can roll it all into one line:
4314
+
4315
+ use Math::BigFloat lib => 'GMP';
4316
+
4317
+ It is also possible to just require Math::BigFloat:
4318
+
4319
+ require Math::BigFloat;
4320
+
4321
+ This will load the necessary things (like BigInt) when they are needed, and
4322
+ automatically.
4323
+
4324
+ See L<Math::BigInt> for more details than you ever wanted to know about using
4325
+ a different low-level library.
4326
+
4327
+ =head2 Using Math::BigInt::Lite
4328
+
4329
+ For backwards compatibility reasons it is still possible to
4330
+ request a different storage class for use with Math::BigFloat:
4331
+
4332
+ use Math::BigFloat with => 'Math::BigInt::Lite';
4333
+
4334
+ However, this request is ignored, as the current code now uses the low-level
4335
+ math library for directly storing the number parts.
4336
+
4337
+ =head1 EXPORTS
4338
+
4339
+ C<Math::BigFloat> exports nothing by default, but can export the C<bpi()> method:
4340
+
4341
+ use Math::BigFloat qw/bpi/;
4342
+
4343
+ print bpi(10), "\n";
4344
+
4345
+ =head1 BUGS
4346
+
4347
+ Please see the file BUGS in the CPAN distribution Math::BigInt for known bugs.
4348
+
4349
+ =head1 CAVEATS
4350
+
4351
+ Do not try to be clever to insert some operations in between switching
4352
+ libraries:
4353
+
4354
+ require Math::BigFloat;
4355
+ my $matter = Math::BigFloat->bone() + 4; # load BigInt and Calc
4356
+ Math::BigFloat->import( lib => 'Pari' ); # load Pari, too
4357
+ my $anti_matter = Math::BigFloat->bone()+4; # now use Pari
4358
+
4359
+ This will create objects with numbers stored in two different backend libraries,
4360
+ and B<VERY BAD THINGS> will happen when you use these together:
4361
+
4362
+ my $flash_and_bang = $matter + $anti_matter; # Don't do this!
4363
+
4364
+ =over 1
4365
+
4366
+ =item stringify, bstr()
4367
+
4368
+ Both stringify and bstr() now drop the leading '+'. The old code would return
4369
+ '+1.23', the new returns '1.23'. See the documentation in L<Math::BigInt> for
4370
+ reasoning and details.
4371
+
4372
+ =item bdiv
4373
+
4374
+ The following will probably not print what you expect:
4375
+
4376
+ print $c->bdiv(123.456),"\n";
4377
+
4378
+ It prints both quotient and remainder since print works in list context. Also,
4379
+ bdiv() will modify $c, so be careful. You probably want to use
4380
+
4381
+ print $c / 123.456,"\n";
4382
+ print scalar $c->bdiv(123.456),"\n"; # or if you want to modify $c
4383
+
4384
+ instead.
4385
+
4386
+ =item brsft
4387
+
4388
+ The following will probably not print what you expect:
4389
+
4390
+ my $c = Math::BigFloat->new('3.14159');
4391
+ print $c->brsft(3,10),"\n"; # prints 0.00314153.1415
4392
+
4393
+ It prints both quotient and remainder, since print calls C<brsft()> in list
4394
+ context. Also, C<< $c->brsft() >> will modify $c, so be careful.
4395
+ You probably want to use
4396
+
4397
+ print scalar $c->copy()->brsft(3,10),"\n";
4398
+ # or if you really want to modify $c
4399
+ print scalar $c->brsft(3,10),"\n";
4400
+
4401
+ instead.
4402
+
4403
+ =item Modifying and =
4404
+
4405
+ Beware of:
4406
+
4407
+ $x = Math::BigFloat->new(5);
4408
+ $y = $x;
4409
+
4410
+ It will not do what you think, e.g. making a copy of $x. Instead it just makes
4411
+ a second reference to the B<same> object and stores it in $y. Thus anything
4412
+ that modifies $x will modify $y (except overloaded math operators), and vice
4413
+ versa. See L<Math::BigInt> for details and how to avoid that.
4414
+
4415
+ =item bpow
4416
+
4417
+ C<bpow()> now modifies the first argument, unlike the old code which left
4418
+ it alone and only returned the result. This is to be consistent with
4419
+ C<badd()> etc. The first will modify $x, the second one won't:
4420
+
4421
+ print bpow($x,$i),"\n"; # modify $x
4422
+ print $x->bpow($i),"\n"; # ditto
4423
+ print $x ** $i,"\n"; # leave $x alone
4424
+
4425
+ =item precision() vs. accuracy()
4426
+
4427
+ A common pitfall is to use L<precision()> when you want to round a result to
4428
+ a certain number of digits:
4429
+
4430
+ use Math::BigFloat;
4431
+
4432
+ Math::BigFloat->precision(4); # does not do what you think it does
4433
+ my $x = Math::BigFloat->new(12345); # rounds $x to "12000"!
4434
+ print "$x\n"; # print "12000"
4435
+ my $y = Math::BigFloat->new(3); # rounds $y to "0"!
4436
+ print "$y\n"; # print "0"
4437
+ $z = $x / $y; # 12000 / 0 => NaN!
4438
+ print "$z\n";
4439
+ print $z->precision(),"\n"; # 4
4440
+
4441
+ Replacing L<precision> with L<accuracy> is probably not what you want, either:
4442
+
4443
+ use Math::BigFloat;
4444
+
4445
+ Math::BigFloat->accuracy(4); # enables global rounding:
4446
+ my $x = Math::BigFloat->new(123456); # rounded immediately to "12350"
4447
+ print "$x\n"; # print "123500"
4448
+ my $y = Math::BigFloat->new(3); # rounded to "3
4449
+ print "$y\n"; # print "3"
4450
+ print $z = $x->copy()->bdiv($y),"\n"; # 41170
4451
+ print $z->accuracy(),"\n"; # 4
4452
+
4453
+ What you want to use instead is:
4454
+
4455
+ use Math::BigFloat;
4456
+
4457
+ my $x = Math::BigFloat->new(123456); # no rounding
4458
+ print "$x\n"; # print "123456"
4459
+ my $y = Math::BigFloat->new(3); # no rounding
4460
+ print "$y\n"; # print "3"
4461
+ print $z = $x->copy()->bdiv($y,4),"\n"; # 41150
4462
+ print $z->accuracy(),"\n"; # undef
4463
+
4464
+ In addition to computing what you expected, the last example also does B<not>
4465
+ "taint" the result with an accuracy or precision setting, which would
4466
+ influence any further operation.
4467
+
4468
+ =back
4469
+
4470
+ =head1 SEE ALSO
4471
+
4472
+ L<Math::BigInt>, L<Math::BigRat> and L<Math::Big> as well as
4473
+ L<Math::BigInt::BitVect>, L<Math::BigInt::Pari> and L<Math::BigInt::GMP>.
4474
+
4475
+ The pragmas L<bignum>, L<bigint> and L<bigrat> might also be of interest
4476
+ because they solve the autoupgrading/downgrading issue, at least partly.
4477
+
4478
+ The package at L<http://search.cpan.org/~tels/Math-BigInt> contains
4479
+ more documentation including a full version history, testcases, empty
4480
+ subclass files and benchmarks.
4481
+
4482
+ =head1 LICENSE
4483
+
4484
+ This program is free software; you may redistribute it and/or modify it under
4485
+ the same terms as Perl itself.
4486
+
4487
+ =head1 AUTHORS
4488
+
4489
+ Mark Biggar, overloaded interface by Ilya Zakharevich.
4490
+ Completely rewritten by Tels L<http://bloodgate.com> in 2001 - 2006, and still
4491
+ at it in 2007.
4492
+
4493
+ =cut