OS X / bigfloat
[
Front page
] [
New
|
List of pages
|
Search
|
Recent changes
]
Start:
[[labs.beatcraft.com]]~
[[OS X]]~
#Contents
* Installing bigfloat on Mac OS X [#j2f931e8]
** About bigfloat [#v55fdb58]
>
bigfloat is a Python extension module, which provides arb...
~
For the details, please visit the URL shown below.~
[[https://pypi.python.org/pypi/bigfloat/0.3.0a2]]~
** Installing bigfloat on Mac OS X [#v7bb896f]
>
To install bigfloat, [[pip>https://pypi.python.org/pypi/p...
~
The command for installing bigfloat and installation proc...
$ sudo pip install bigfloat
Downloading/unpacking bigfloat
Downloading bigfloat-0.2.1.tar.gz (129kB): 129kB downl...
Running setup.py (path:/private/tmp/pip_build_root/big...
Installing collected packages: bigfloat
Running setup.py install for bigfloat
Successfully installed bigfloat
Cleaning up...
>
To examine whether the installation process is successful...
~
$ python
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] o...
Type "help", "copyright", "credits" or "license" for mor...
>>> from bigfloat import *
>>> BigFloat(1)
BigFloat.exact('1.0000000000000000', precision=53)
>>> BigFloat('3.141592')
BigFloat.exact('3.1415920000000002', precision=53)
>>> BigFloat('3.14159') ** 2 / 6.0
BigFloat.exact('1.6449312880166664', precision=53)
>>> BigFloat('0.1',precision(200))
BigFloat.exact('0.10000000000000000000000000000000000000...
>>> with precision(10000):
... print sqrt(2)
...
1.414213562373095048801688724209698078569671875376948073...
58507372126441214970999358314132226659275055927557999505...
23048430871432145083976260362799525140798968725339654633...
03408498847160386899970699004815030544027790316454247823...
77154218334204285686060146824720771435854874155657069677...
65918003113882464681570826301005948587040031864803421948...
49573810896750401836986836845072579936472906076299694138...
41728531478105803603371077309182869314710171111683916581...
76532396946175112916024087155101351504553812875600526314...
37868405228783762938921430065586956868596459515550164472...
15771756228549741438999188021762430965206564211827316726...
09881593486400834570851814722318142040704265090565323333...
77775368142621773879919455139723127406689832998989538672...
92538904755828834526096524096542889394538646625744927556...
22394758214263065851322174088323829472876173936474678374...
66115673458533483329525467585164471075784860246360083444...
00760361009159465670676883605571740076756905096136719401...
95310572559349844511269227803449135066375687477602831628...
99081237189254072647536785030482159180188616710897286922...
08983060800326311816427988231171543638696617029999341616...
56745336836136745973744239885532851793089603738989151731...
88351763622474975785885836803745793115733980209998662218...
88642473463585886864496822386006983352642799056283165613...
21531323682813569889376
>>>
~
if you obtain the same results as shown above, bigfloat h...
* Revision History [#vc729c92]
>
- 2015/01/06 This article is initially uploaded
End:
[[labs.beatcraft.com]]~
[[OS X]]~
#Contents
* Installing bigfloat on Mac OS X [#j2f931e8]
** About bigfloat [#v55fdb58]
>
bigfloat is a Python extension module, which provides arb...
~
For the details, please visit the URL shown below.~
[[https://pypi.python.org/pypi/bigfloat/0.3.0a2]]~
** Installing bigfloat on Mac OS X [#v7bb896f]
>
To install bigfloat, [[pip>https://pypi.python.org/pypi/p...
~
The command for installing bigfloat and installation proc...
$ sudo pip install bigfloat
Downloading/unpacking bigfloat
Downloading bigfloat-0.2.1.tar.gz (129kB): 129kB downl...
Running setup.py (path:/private/tmp/pip_build_root/big...
Installing collected packages: bigfloat
Running setup.py install for bigfloat
Successfully installed bigfloat
Cleaning up...
>
To examine whether the installation process is successful...
~
$ python
Python 2.7.5 (default, Mar 9 2014, 22:15:05)
[GCC 4.2.1 Compatible Apple LLVM 5.0 (clang-500.0.68)] o...
Type "help", "copyright", "credits" or "license" for mor...
>>> from bigfloat import *
>>> BigFloat(1)
BigFloat.exact('1.0000000000000000', precision=53)
>>> BigFloat('3.141592')
BigFloat.exact('3.1415920000000002', precision=53)
>>> BigFloat('3.14159') ** 2 / 6.0
BigFloat.exact('1.6449312880166664', precision=53)
>>> BigFloat('0.1',precision(200))
BigFloat.exact('0.10000000000000000000000000000000000000...
>>> with precision(10000):
... print sqrt(2)
...
1.414213562373095048801688724209698078569671875376948073...
58507372126441214970999358314132226659275055927557999505...
23048430871432145083976260362799525140798968725339654633...
03408498847160386899970699004815030544027790316454247823...
77154218334204285686060146824720771435854874155657069677...
65918003113882464681570826301005948587040031864803421948...
49573810896750401836986836845072579936472906076299694138...
41728531478105803603371077309182869314710171111683916581...
76532396946175112916024087155101351504553812875600526314...
37868405228783762938921430065586956868596459515550164472...
15771756228549741438999188021762430965206564211827316726...
09881593486400834570851814722318142040704265090565323333...
77775368142621773879919455139723127406689832998989538672...
92538904755828834526096524096542889394538646625744927556...
22394758214263065851322174088323829472876173936474678374...
66115673458533483329525467585164471075784860246360083444...
00760361009159465670676883605571740076756905096136719401...
95310572559349844511269227803449135066375687477602831628...
99081237189254072647536785030482159180188616710897286922...
08983060800326311816427988231171543638696617029999341616...
56745336836136745973744239885532851793089603738989151731...
88351763622474975785885836803745793115733980209998662218...
88642473463585886864496822386006983352642799056283165613...
21531323682813569889376
>>>
~
if you obtain the same results as shown above, bigfloat h...
* Revision History [#vc729c92]
>
- 2015/01/06 This article is initially uploaded
Page: