pi-calculator/0000755000175000001440000000000010365257022013507 5ustar sebastianuserspi-calculator/CVS/0000755000175000001440000000000010365257022014142 5ustar sebastianuserspi-calculator/CVS/Root0000644000175000001440000000006710365257022015013 0ustar sebastianuserskickino@cvs.savannah.nongnu.org:/sources/pi-calculator pi-calculator/CVS/Repository0000644000175000001440000000001610365257022016241 0ustar sebastianuserspi-calculator pi-calculator/CVS/Entries0000644000175000001440000000012110365257022015470 0ustar sebastianusers/COPYING/1.1/Sat Jan 7 18:43:25 2006// /README/1.2/Mon Jan 23 22:50:01 2006// D pi-calculator/CVS/Entries.Log0000644000175000001440000000001410365257022016211 0ustar sebastianusersA D/src//// pi-calculator/src/0000755000175000001440000000000010365506620014277 5ustar sebastianuserspi-calculator/src/CVS/0000755000175000001440000000000010365257022014731 5ustar sebastianuserspi-calculator/src/CVS/Root0000644000175000001440000000006710365257022015602 0ustar sebastianuserskickino@cvs.savannah.nongnu.org:/sources/pi-calculator pi-calculator/src/CVS/Repository0000644000175000001440000000002210365257022017025 0ustar sebastianuserspi-calculator/src pi-calculator/src/CVS/Entries0000644000175000001440000000071510365257022016270 0ustar sebastianusers/Makefile/1.2/Sun Jan 8 14:54:16 2006// /bbp.cpp/1.2/Wed Jan 11 09:22:52 2006// /franois_vite.cpp/1.2/Wed Jan 11 09:22:52 2006// /gottfried_wilhelm_leibniz.cpp/1.2/Wed Jan 11 09:22:52 2006// /johann_heinrich_lambert.cpp/1.2/Wed Jan 11 09:22:52 2006// /john_wallis.cpp/1.2/Wed Jan 11 09:22:52 2006// /leonhard_euler.cpp/1.2/Wed Jan 11 09:22:52 2006// /main.cpp/1.2/Wed Jan 11 09:22:52 2006// /srinivasa_aiyangar_ramanujan.cpp/1.2/Wed Jan 11 09:22:52 2006// D pi-calculator/src/bbp.c0000644000175000001440000000434210365507006015210 0ustar sebastianusers/*********************************************************/ /* Bailey-Borwein-Plouffe formula to calculate Pi by */ /* David H. Bailey, Peter Borwein and Simon Plouffe ('97)*/ /* http://en.wikipedia.org/wiki/BBP_formula */ /* http://crd.lbl.gov/~dhbailey/pi/pi-alg */ /* http://mathworld.wolfram.com/BBP-TypeFormula.html */ /* ----------------------------------------------------- */ /* Autor: Sebastian Wieseler */ /* Mail: programming@kickino.org */ /* Web: http://www.kickino.org/ */ /* IRC: #uscc @ irc.forkbomb.ch:6668 (ssl only) */ /* ----------------------------------------------------- */ /* Date: 2006-01-03 */ /* Last Change: 2006-01-24 */ /* CVS-Version: nA */ /* ----------------------------------------------------- */ /* tested OS: GNU/Linux */ /* Copyright: 2006 by Sebastian Wieseler */ /* ----------------------------------------------------- */ /* License: GNU General Public License v2 or any later */ /* ----------------------------------------------------- */ /* NO WARRANTY! */ /*********************************************************/ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include long double expo(long double a, long double b) { if (b==0) return 1; // a^0 = 1 long double help=a; int i; for (i=1; i int main(int argc, char *argv[]) { long double i, two_over_pi=1; for (i=1;i<=atoi(argv[1]);i++) { two_over_pi *= (1 - 1./(4*i*i)) ; printf ("%6.0Lf : %.60Lf \n", i, 2./two_over_pi ); } } pi-calculator/src/john_wallis0000755000175000001440000002033610365503317016542 0ustar sebastianusersELF 4(4 (# 444444HHH Qtde(/lib/ld-linux.so.2GNUI.95*:  _Jv_RegisterClasses__gmon_start__libc.so.6printfatoi_IO_stdin_used__libc_start_mainGLIBC_2.0$ii [ܖU}5%%h%h%h1^PTRhhQVhԃUS[ÓPtЋ]ÐU=t ҡuÐUt!t$<|ÐUH)ĸ?E؉U܉M?EUME $P$d$ms_m-mm}-m|$EUMD$T$L$ $^m}{ÐUWV1S  )9s׍&' F9r [^_]ÍU$Bt$ )puO$t$] Nu$ÐUSЋuX[]ÐUS[CR]%6.0Lf : %.60Lf @@$  h e o|oon  GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8), D"ԃ$}тCmain/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2ԃGNU C 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)john_wallis.c/home/sebastian/website/html/pi/pi-calculator/srcunsigned charshort unsigned intlong unsigned intsigned charshort intintlong long intlong long unsigned intlong int;charmain&ԃUargc%argv% i'htwo_over_pi'Xatoi) 5long double /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2%% $ > $ >  I.? : ; ' I@ : ; I 4: ; I .? : ; I< %p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrti.S2,Wd",:D ,Wdd,,-:C! john_wallis.cԃ%s>0 p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrtn.S:т | ԃAB unsigned int.symtab.strtab.shstrtab.interp.note.ABI-tag.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_pubnames.debug_info.debug_abbrev.debug_line.debug_frame.debug_str44#HH 1hh07 p?eGonnTo|| c l  upԂ@{  tLܖ x( C 4w  ,) 4"U N4Hhn|  Ԃ   ܖ !"kvvvkvEkD p  #0 =KWp mEmkmP ! '  .AT Q]ԃ b 9 *` + ? /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/config.habi-note.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/abi-tag.hinit.c/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/defs.hinitfini.ccall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__p.0completed.1__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.Sjohn_wallis.celf-init.c_DYNAMIC_fp_hw__fini_array_end__dso_handle__libc_csu_fini_init_start__fini_array_start__libc_csu_init__bss_startmain__libc_start_main@@GLIBC_2.0__init_array_enddata_startprintf@@GLIBC_2.0_finiatoi@@GLIBC_2.0_edata__i686.get_pc_thunk.bx_GLOBAL_OFFSET_TABLE__end__init_array_start_IO_stdin_used__data_start_Jv_RegisterClasses__gmon_start__pi-calculator/src/gottfried_wilhelm_leibniz0000755000175000001440000002035010365505270021451 0ustar sebastianusersELF 4$4 (# 444444ЕЕ HHH Qtde(/lib/ld-linux.so.2GNUS89?*D  libm.so.6_Jv_RegisterClasses__gmon_start__libc.so.6printfatoi_IO_stdin_used__libc_start_mainGLIBC_2.0.ii eĖȖ̖Uqs5%%Ėh%Ȗh%̖h1^PTRhhQVhԃUS[kPtЋ]ÐU=ܖt ؖҡؖuܖÐUt!t$<|ÐUH)ĸEUMEE $;E~jEuE@P$d$m}E@P$d$m}m-|$E@D$$yEUWV1S )9s׍&'F9r [^_]ÍU$Bút$)puO$t$]Nu$ÐUSЕЕЋuX[]ÐUS[;R]%6.0d : %.62Lf @. Ȃ th o oooxܕGCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8),tȂ D"ԃ$݂Qmain/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2ԃGNU C 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)gottfried_wilhelm_leibniz.c/home/sebastian/website/html/pi/pi-calculator/srcunsigned charshort unsigned intlong unsigned intsigned charshort intintlong long intlong long unsigned intlong intIcharmain&ԃUargc%argv% quarter_of_pi'hi(datoi* Clong double /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2%% $ > $ >  I.? : ; ' I@ : ; I 4: ; I .? : ; I< %p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrti.St2,WdȂ",:D ,Wdd,,-:W/ gottfried_wilhelm_leibniz.cԃ%ty# qp /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrtn.S:݂ | ԃAB unsigned int.symtab.strtab.shstrtab.interp.note.ABI-tag.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_pubnames.debug_info.debug_abbrev.debug_line.debug_frame.debug_str44#HH 1hh07 p?oGoxxTo c l  uȂp@{  Ttt<̅ЕؕЖ ܖx  D_  ,) 4"U \4Hhx Ȃ   t ̅ЕؕЖܖ !"kvvvkvEkD Еؕؖܖp  #ԕ0ܕ=̅KWP mEmkmЕԖP /Ȃ 5  <ЕOT _ܖkԃ pЕЖ 9t *ܖ@  Е,Ж9 M /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/config.habi-note.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/abi-tag.hinit.c/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/defs.hinitfini.ccall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__p.0completed.1__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.Sgottfried_wilhelm_leibniz.celf-init.c_DYNAMIC_fp_hw__fini_array_end__dso_handle__libc_csu_fini_init_start__fini_array_start__libc_csu_init__bss_startmain__libc_start_main@@GLIBC_2.0__init_array_enddata_startprintf@@GLIBC_2.0_finiatoi@@GLIBC_2.0_edata__i686.get_pc_thunk.bx_GLOBAL_OFFSET_TABLE__end__init_array_start_IO_stdin_used__data_start_Jv_RegisterClasses__gmon_start__pi-calculator/src/johann_heinrich_lambert0000755000175000001440000002073310365503450021064 0ustar sebastianusersELF 44 (# 444444`````tttHHH Qtde(/lib/ld-linux.so.2GNUI.95*:$  _Jv_RegisterClasses__gmon_start__libc.so.6printfatoi_IO_stdin_used__libc_start_mainGLIBC_2.0$ii [<LPTU}5D%H%Lh%Ph%Th1^PTRhh QVh`US[PtЋ]ÐU=dt `ҡ`udÐUpt!t$p<|ÐUHEm wPEM}E}ȋE UMD$T$L$ E$mm}m}"Em zt}0mU8)ĸ?EUME $`P$d$msbEUMD$T$L$ ?$-P|$EUMD$T$L$ $4m}xÐUWV1S  )9s׍&' F9r [^_]ÍU$Bòt$ )puO$t$] Nu$ÐUS``ЋuX[]ÐUS[3RV]%6.0Lf : %.62Lf @$  h e @o|oont lGCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8), D"ԃJ$т(Olambert_algomain/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2ԃGNU C 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)johann_heinrich_lambert.c/home/sebastian/website/html/pi/pi-calculator/srcunsigned charshort unsigned intlong unsigned intsigned charshort intintlong long intlong long unsigned intlong intGcharlambert_algo(ԃ`Un'i' long double floatmain0`Uargc/argv/ i1hatoi2 A/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2%% $ > $ >  I.? : ; ' I@ : ; I 4: ; I .? : ; I< %p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrti.S2,Wd",:D ,Wdd,,-:T- johann_heinrich_lambert.cԃ'dP,r>S p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrtn.S:т | ԃAB `AB unsigned int.symtab.strtab.shstrtab.interp.note.ABI-tag.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_pubnames.debug_info.debug_abbrev.debug_line.debug_frame.debug_str44#HH 1hh07 p?eGonnTo|| c l  upԂ@{    <\\``hhpptt<<@@XX ddd x , p$  tD) 4t"U tg4Hhn|  Ԃ   \`hpt<@Xd !"kvvvkvEkD `hp`dp  #d0l=\KpW mEmkmt `\P - 3  :`M T ]di` n`X 9 *ԃ dЅ @h`($7XD X /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/config.habi-note.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/abi-tag.hinit.c/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/defs.hinitfini.ccall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__p.0completed.1__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.Sjohann_heinrich_lambert.celf-init.c_DYNAMIC_fp_hw__fini_array_end__dso_handle__libc_csu_fini_init_start__fini_array_start__libc_csu_init__bss_startmain__libc_start_main@@GLIBC_2.0__init_array_enddata_startprintf@@GLIBC_2.0_finiatoi@@GLIBC_2.0lambert_algo_edata__i686.get_pc_thunk.bx_GLOBAL_OFFSET_TABLE__end__init_array_start_IO_stdin_used__data_start_Jv_RegisterClasses__gmon_start__pi-calculator/src/franois_vite0000755000175000001440000002110010365504067017631 0ustar sebastianusersELFp4H4 (# 444444HHH Qtde(/lib/ld-linux.so.2GNUX=9.yD*IT  libm.so.6_Jv_RegisterClasses__gmon_start__sqrtlibc.so.6printfatoi_IO_stdin_used__libc_start_mainGLIBC_2.0 ii j3ii jU5%%h%h%h%h1^PTRhhPQVhtUS[PtЋ]ÐU=t ҡuÐUt!t${ÐU8mzt -`}(m<$-p]E$}mUH)ĸh3?EUM@E؉U܉ME $P$d$mshE؋U܋M$T$L$%-m}-m|$E؋U܋MD$T$L$ $|m}rUWV1S ()9s׍&'F9r [^_]ÍU$Bt$)puO$t$]Nu$ÐUSЋuX[]ÐUS[KRv]h3?@%6.0Lf : %.62Lf @3  4h t  ooo6FVfGCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8),4 "$,$J*Pviete_formula1main/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2P$GNU C 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)franois_vite.c/home/sebastian/website/html/pi/pi-calculator/srcunsigned charshort unsigned intlong unsigned intsigned charshort intintlong long intlong long unsigned intlong int>chardoubleviete_formula19$tUn8long double mainBtPUargcAargvA two_over_piDhiEXatoiG 8/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2%% $ > $ >  I.? : ; ' I@ : ; I 4: ; I .? : ; I< %p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrti.S42,Wd",: ,Wdd,,-:O$ franois_vite.c$8d(Xt>)0 p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrtn.SJ: | $PAB tAB unsigned int.symtab.strtab.shstrtab.interp.note.ABI-tag.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_pubnames.debug_info.debug_abbrev.debug_line.debug_frame.debug_str44#HH 1hh47 ?tGoTo@c l   up  P{pp44PPL X x . tr D) 4"U p4Hh   p 4 P !"kvvvkvEk   #0=KW mEmkm$P P#P 3 9p @SPT cot t 94 y* 1T@M a /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/config.habi-note.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/abi-tag.hinit.c/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/defs.hinitfini.ccall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__p.0completed.1__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.Sfranois_vite.celf-init.cviete_formula1_DYNAMIC_fp_hw__fini_array_end__dso_handle__libc_csu_fini_init_start__fini_array_start__libc_csu_init__bss_startmain__libc_start_main@@GLIBC_2.0__init_array_enddata_startprintf@@GLIBC_2.0_finisqrt@@GLIBC_2.0atoi@@GLIBC_2.0_edata__i686.get_pc_thunk.bx_GLOBAL_OFFSET_TABLE__end__init_array_start_IO_stdin_used__data_start_Jv_RegisterClasses__gmon_start__pi-calculator/src/leonhard_euler0000755000175000001440000002062510365505520017220 0ustar sebastianusersELFp44 (# 44444400000DDDHHH Qtde(/lib/ld-linux.so.2GNUX=9.yD*I  libm.so.6_Jv_RegisterClasses__gmon_start__sqrtlibc.so.6printfatoi_IO_stdin_used__libc_start_mainGLIBC_2.0 ii j3ii j$(,0U5% %$h%(h%,h%0h1^PTRhPhQVh$US[{PtЋ]ÐU=@t <ҡ<u@ÐU@t!t$@{ÐUX)ĸE؉U܉M?EUME $P$d$msXmmm}m- $\$EUMD$T$L$ $^m}UWV1S )9s׍&'F9r [^_]ÍU$Bút$)puO$t$]Nu$ÐUS00ЋuX[]ÐUS[;R]%6.0Lf : %.60f @3  ԅh t  oooD6FVf<GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8),ԅ "$$Fmain/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2$GNU C 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)leonhard_euler.c/home/sebastian/website/html/pi/pi-calculator/srcunsigned charshort unsigned intlong unsigned intsigned charshort intintlong long intlong long unsigned intlong int>charmain&$Uargc%argv% i'hpi'Xatoi)  sqrt 8long double double/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2%% $ > $ >  I.? : ; ' I@ : ; I 4: ; I .? : ; I<   .? : ; ' I< I%p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrti.Sԅ2,Wd",: ,Wdd,,-:T2 leonhard_euler.c$%s>:8 p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrtn.S: | $AB unsigned int.symtab.strtab.shstrtab.interp.note.ABI-tag.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_pubnames.debug_info.debug_abbrev.debug_line.debug_frame.debug_str44#HH 1hh47 ?tGoTo@c l   up  P{ppdԅ<,,0088@@DD44 @@@x` { [  L,)x 44"U 4a4Hh   p ԅ ,08@D4@ !"kvvvkvEk 08@<@  #40<=,K@W mEmkmD08PP $ *p 10DT T@`$ e04 9ԅ y*@  D0"14> R /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/config.habi-note.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/abi-tag.hinit.c/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/defs.hinitfini.ccall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__p.0completed.1__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.Sleonhard_euler.celf-init.c_DYNAMIC_fp_hw__fini_array_end__dso_handle__libc_csu_fini_init_start__fini_array_start__libc_csu_init__bss_startmain__libc_start_main@@GLIBC_2.0__init_array_enddata_startprintf@@GLIBC_2.0_finisqrt@@GLIBC_2.0atoi@@GLIBC_2.0_edata__i686.get_pc_thunk.bx_GLOBAL_OFFSET_TABLE__end__init_array_start_IO_stdin_used__data_start_Jv_RegisterClasses__gmon_start__pi-calculator/src/main.cpp0000644000175000001440000000660610361147154015736 0ustar sebastianusers/*********************************************************/ /* Main file to execute some alogrithm of our project */ /* to calculate Pi */ /* ----------------------------------------------------- */ /* Autor: Sebastian Wieseler, Pascal Fricke */ /* Mail: programming@kickino.org */ /* Web: http://www.kickino.org/ */ /* IRC: #uscc @ irc.forkbomb.ch:6668 (ssl only) */ /* ----------------------------------------------------- */ /* Date: 2006-01-06 */ /* Last Change: 2006-01-11 */ /* CVS-Version: 1.2 */ /* ----------------------------------------------------- */ /* tested OS: GNU/Linux */ /* Copyright: 2006 by Sebastian Wieseler */ /* ----------------------------------------------------- */ /* License: GNU General Public License v2 or any later */ /* ----------------------------------------------------- */ /* NO WARRANTY! */ /*********************************************************/ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include char *decission_algo() { int algo_count; char *argv[0]; printf("%s " , "Which algorithm do you want to use for the calculation?"); scanf("%d" , &algo_count); switch(algo_count) { case 1 : argv[0] = "./bbp"; break; case 2 : argv[0] = "./leonhard_euler"; break; case 3 : argv[0] = "./johann_heinrich_lambert"; break; case 4 : argv[0] = "./gottfried_wilhelm_leibniz"; break; case 5 : argv[0] = "./srinivasa_aiyangar_ramanujan"; break; case 6 : argv[0] = "./franois_vite"; break; case 7 : argv[0] = "./john_wallis"; break; // default: printf("%s \n", "You should enter a number from above."); break; } return argv[0]; } void print_menu() { printf("\n %s \n", "PI - Calculator - (C) 2005,2006 Sebastian Wieseler [GPL]"); printf(" %s\n\n" , "========================================================"); printf("%s \n", " 1) Bailey-Borwein-Plouffe formula"); printf("%s \n", " 2) Euler formula"); printf("%s \n", " 3) Lambert formula"); printf("%s \n", " 4) Leibnitz formula"); printf("%s \n", " 5) Ramanujan formula"); printf("%s \n", " 6) Vite formula"); printf("%s \n", " 7) Wallis formula"); printf("\n"); } int main() { char *argv[3], *envp[1]; char algo_run[0]; // print the menu print_menu(); // ask what algorithm to use argv[0] = decission_algo(); // ask how many runs we should do with our algorithm printf("%s ", "How many runs?"); scanf("%s" , algo_run); argv[1] = algo_run; argv[2] = 0; /* terminate argv list */ envp[0] = 0; /* empty environment for argv[0] */ // execute my algorithm execve(argv[0],argv,envp); // print the bad truth - we are not perfect :( printf("%s %.62f \n", " The original Pi is:", 3.141592653589793238462643383279502884197169399375); return 0; } pi-calculator/src/srinivasa_aiyangar_ramanujan0000755000175000001440000002172010365504317022136 0ustar sebastianusersELF 44 (# 444444````` tttHHH Qtde(/lib/ld-linux.so.2GNUS89?*D  libm.so.6_Jv_RegisterClasses__gmon_start__libc.so.6printfatoi_IO_stdin_used__libc_start_mainGLIBC_2.0.ii eDTX\Uq5L%P%Th%Xh%\h1^PTRhPhQVhUS[PtЋ]ÐU=lt hҡhulÐUpt!t$p<|ÐU$mzt}m<$m}mU(mzt}LEU MEUMEEmwmm}EߋEUME؉U܉MmUh)ĸE؉U܉MEUME $5P$d$msm- <$m-0-@}ȋEUM$T$L$@D$ T$L$<$}m- |$ ƹ@$T$L$mmm}m-P|$EUMD$T$L$ $.m}ÐUWV1S H)9s׍&'F9r [^_]ÍU$Bt$)puO$t$]Nu$ÐUS``ЋuX[]ÐUS[kR]%6.0Lf : %.62Lf @, @ @bLM?. Ȃ Ԇh o HoooxtlGCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8),ԆȂ D"ԃ$3݂(|Tfacexpomain/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2xԃGNU C 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)srinivasa_aiyangar_ramanujan.c/home/sebastian/website/html/pi/pi-calculator/srcunsigned charshort unsigned intlong unsigned intsigned charshort intintlong long intlong long unsigned intlong intLchar|fac&|ԃUi%|long double expo.|Ua-|b-|help0|hi1dkmain;Uargc:argv:k i<|hone_over_pi<|XKatoi? ҅ sqrtq qFdouble:/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2%% $ > $ >  I.? : ; ' I@ : ; I 4: ; I .? : ; I<   .? : ; ' I< I%p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrti.SԆ2,WdȂ",:D ,Wdd,,-:y@ srinivasa_aiyangar_ramanujan.cԃ%dsdXd VtYtA4  p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrtn.S:݂ | ԃ;AB pAB dAB unsigned int.symtab.strtab.shstrtab.interp.note.ABI-tag.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_pubnames.debug_info.debug_abbrev.debug_line.debug_frame.debug_str44#HH 1hh07 p?oGoxxTo c l  uȂp@{  Ԇl\\``hhppttDDHH`` lll x , k@\) 4X"U hh4Hhx Ȃ   Ԇ \`hptDH`l !"kvvvkvEkD `hphlp  #d0l=\KpW mEmkmt`d"PP 2Ȃ 8  ?`RT blnd s`` 9Ԇ *l Hp p `%4`A Uԃ; Y /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/config.habi-note.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/abi-tag.hinit.c/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/defs.hinitfini.ccall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__p.0completed.1__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.Ssrinivasa_aiyangar_ramanujan.celf-init.c_DYNAMIC_fp_hw__fini_array_end__dso_handle__libc_csu_fini_init_start__fini_array_start__libc_csu_init__bss_startmain__libc_start_main@@GLIBC_2.0__init_array_enddata_startprintf@@GLIBC_2.0_finiatoi@@GLIBC_2.0_edata__i686.get_pc_thunk.bx_GLOBAL_OFFSET_TABLE__endexpo__init_array_start_IO_stdin_used__data_start_Jv_RegisterClassesfac__gmon_start__pi-calculator/src/bbp0000755000175000001440000002120310365260371014766 0ustar sebastianusersELF 44 (# 44444400000DDDHHH Qtde(/lib/ld-linux.so.2GNUI.95*:  _Jv_RegisterClasses__gmon_start__libc.so.6printfatoi_IO_stdin_used__libc_start_mainGLIBC_2.0$ii [  $U}5%%h% h%$h1^PTRhhQVhDUS[PtЋ]ÐU=4t 0ҡ0u4ÐU@t!t$@<|ÐU(mzt}LEU MEUMEEmwmm}EߋEUME؉U܉MmUH)ĸEUME؉U܉ME $dP$d$mwE؋U܋MD$ T$L$@$T$L$m--m---m--m-- m}EUMD$T$L$m|$$gm}ÐUWV1S P )9s׍&' F9r [^_]ÍU$Bt$ )puO$t$] Nu$ÐUS00ЋuX[]ÐUS[sR]%6.0Lf : %.60Lf @@@@@$  h e o|oonD <GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)GCC: (GNU) 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)GCC: (GNU) 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8), D"ԃ$т ;expomain/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2ԃGNU C 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)bbp.c/home/sebastian/website/html/pi/pi-calculator/srcunsigned charshort unsigned intlong unsigned intsigned charshort intintlong long intlong long unsigned intlong int3charexpo)ԃDUa(b(help+hi-dlong double main6DUargc5argv5 pi7hi9Xatoi; - /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.S/var/tmp/portage/glibc-2.3.5-r2/work/glibc-2.3.5/csuGNU AS 2.15.92.0.2%% $ > $ >  I.? : ; ' I@ : ; I 4: ; I .? : ; I< %p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrti.S2,Wd",:D ,Wdd,,-:J bbp.cԃ(d VtYuA, Vp /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrtn.S:т | ԃpAB D_AB unsigned int.symtab.strtab.shstrtab.interp.note.ABI-tag.hash.dynsym.dynstr.gnu.version.gnu.version_r.rel.dyn.rel.plt.init.text.fini.rodata.eh_frame.ctors.dtors.jcr.dynamic.got.got.plt.data.bss.comment.debug_aranges.debug_pubnames.debug_info.debug_abbrev.debug_line.debug_frame.debug_str44#HH 1hh07 p?eGonnTo|| c l  upԂ@{  t|,,0088@@DD  (( 444 xX $| s 8D)| 48"U 8K4Hhn|  Ԃ   ,08@D (4 !"kvvvkvEkD 08@04p  #40<=,K@Wp mEmkmD0, P    &09T I4UD_ Zw0( 9 *4` 8ԃp 0 (( < /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/config.habi-note.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/abi-tag.hinit.c/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/defs.hinitfini.ccall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__p.0completed.1__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.Sbbp.celf-init.c_DYNAMIC_fp_hw__fini_array_end__dso_handle__libc_csu_fini_init_start__fini_array_start__libc_csu_init__bss_startmain__libc_start_main@@GLIBC_2.0__init_array_enddata_startprintf@@GLIBC_2.0_finiatoi@@GLIBC_2.0_edata__i686.get_pc_thunk.bx_GLOBAL_OFFSET_TABLE__endexpo__init_array_start_IO_stdin_used__data_start_Jv_RegisterClasses__gmon_start__pi-calculator/src/franois_vite.c0000644000175000001440000000461110365507016020054 0ustar sebastianusers/*********************************************************/ /* Vite formula to calculate Pi */ /* http://en.wikipedia.org/wiki/Vi%C3%A8te_formula */ /* ----------------------------------------------------- */ /* Autor: Sebastian Wieseler, Pascal Fricke */ /* Mail: programming@kickino.org */ /* Web: http://www.kickino.org/ */ /* IRC: #uscc @ irc.forkbomb.ch:6668 (ssl only) */ /* ----------------------------------------------------- */ /* Date: 2005-12-31 */ /* Last Change: 2006-01-24 */ /* CVS-Version: nA */ /* ----------------------------------------------------- */ /* tested OS: GNU/Linux */ /* Copyright: 2005,2006 by Sebastian Wieseler */ /* ----------------------------------------------------- */ /* License: GNU General Public License v2 or any later */ /* ----------------------------------------------------- */ /* NO WARRANTY! */ /*********************************************************/ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include #include /* was my first try to run viete_formula :-) long double viete_formula0(int n) { // you need a 'const int pass=30' e.g. for doing this // never tried to implement argc[1] for that, sorry man :( long double a[pass]; if (n==1) return sqrt(2); // a[1]=sqrt(2) a[n] = sqrt( 2 + viete_formula0(n-1) ); // a[n] = sqrt(2 + a[n-1]); return a[n]; } */ long double viete_formula1(long double n) { if (n==1) return sqrt(2); // a[1]=sqrt(2) return sqrt( 2 + viete_formula1(n-1) ); } int main(int argc, char *argv[]) { long double two_over_pi = sqrt(2)/2; long double i; for (i=2; i<=(atoi(argv[1])); i++) { two_over_pi *= viete_formula1(i) / 2; printf ("%6.0Lf : %.62Lf \n", i, 2/two_over_pi ); } } pi-calculator/src/johann_heinrich_lambert.c0000644000175000001440000000375710365507035021314 0ustar sebastianusers/*********************************************************/ /* Lambert's algorithm to calculate Pi */ /* ----------------------------------------------------- */ /* Autor: Sebastian Wieseler, Pascal Fricke */ /* Mail: programming@kickino.org */ /* Web: http://www.kickino.org/ */ /* IRC: #uscc @ irc.forkbomb.ch:6668 (ssl only) */ /* ----------------------------------------------------- */ /* Date: 2005-12-27 */ /* Last Change: 2006-01-24 */ /* CVS-Version: nA */ /* ----------------------------------------------------- */ /* tested OS: GNU/Linux */ /* Copyright: 2005,2006 by Sebastian Wieseler */ /* ----------------------------------------------------- */ /* License: GNU General Public License v2 or any later */ /* ----------------------------------------------------- */ /* NO WARRANTY! */ /*********************************************************/ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include // Pi = 4./(n+1); // i = atoi(argv[1]) -- counter; long double lambert_algo(float n, long double i) { if (n < i) return ((n*n)/(((2*n)+1)+lambert_algo(n+1,i))); else if (n == i) // should be else return 1; } int main(int argc, char *argv[]) { long double i; for (i=1; i<=atoi(argv[1]); i++) { printf ("%6.0Lf : %.62Lf \n", i, 4./(lambert_algo(1,i)+1) ); } } pi-calculator/src/srinivasa_aiyangar_ramanujan.c0000644000175000001440000000450510365507064022360 0ustar sebastianusers/*********************************************************/ /* Ramanujan's algorithm to calculate Pi */ /* http://en.wikipedia.org/wiki/Ramanujan#Mathematical_achievements */ /* ----------------------------------------------------- */ /* Autor: Sebastian Wieseler */ /* Mail: programming@kickino.org */ /* Web: http://www.kickino.org/ */ /* IRC: #uscc @ irc.forkbomb.ch:6668 (ssl only) */ /* ----------------------------------------------------- */ /* Date: 2005-12-31 */ /* Last Change: 2006-01-24 */ /* CVS-Version: nA */ /* ----------------------------------------------------- */ /* tested OS: GNU/Linux */ /* Copyright: 2005,2006 by Sebastian Wieseler */ /* ----------------------------------------------------- */ /* License: GNU General Public License v2 or any later */ /* ----------------------------------------------------- */ /* NO WARRANTY! */ /*********************************************************/ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include long double fac(long double i) { if(i==0) return 1; else return i*fac(i-1); } long double expo(long double a, long double b) { if (b==0) return 1; // a^0 = 1 long double help=a; int i; for (i=1; i int main(int argc, char *argv[]) { long double i, pi=0; for (i=1; i<=atoi(argv[1]); i++) { pi += (1./(i*i)); printf ("%6.0Lf : %.60f \n", i, sqrt(6*pi) ); } } pi-calculator/src/gottfried_wilhelm_leibniz.c0000644000175000001440000000366010365507026021675 0ustar sebastianusers/*********************************************************/ /* Leibniz formula for pi */ /* http://en.wikipedia.org/wiki/Leibniz_formula_for_pi */ /* ----------------------------------------------------- */ /* Autor: Sebastian Wieseler, Pascal Fricke */ /* Mail: programming@kickino.org */ /* Web: http://www.kickino.org/ */ /* IRC: #uscc @ irc.forkbomb.ch:6668 (ssl only) */ /* ----------------------------------------------------- */ /* Date: 2005-12-29 */ /* Last Change: 2006-01-24 */ /* CVS-Version: nA */ /* ----------------------------------------------------- */ /* tested OS: GNU/Linux */ /* Copyright: 2005,2006 by Sebastian Wieseler */ /* ----------------------------------------------------- */ /* License: GNU General Public License v2 or any later */ /* ----------------------------------------------------- */ /* NO WARRANTY! */ /*********************************************************/ /* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include int main(int argc, char *argv[]) { long double quarter_of_pi=0; int i; for (i=0; i/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/config.habi-note.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/abi-tag.hinit.c/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crti.S/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/defs.hinitfini.ccall_gmon_startcrtstuff.c__CTOR_LIST____DTOR_LIST____JCR_LIST__p.0completed.1__do_global_dtors_auxframe_dummy__CTOR_END____DTOR_END____FRAME_END____JCR_END____do_global_ctors_aux/var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csu/crtn.Smain.cpp_ZSt17__verify_groupingPKcjRKSs_ZSt8__ioinit_Z41__static_initialization_and_destruction_0ii__tcf_0_GLOBAL__I__Z14decission_algovelf-init.c_ZNSt8ios_base4InitC1Ev@@GLIBCXX_3.4_DYNAMIC_fp_hw__fini_array_end_Z14decission_algov__dso_handle__libc_csu_fini__cxa_atexit@@GLIBC_2.1.3execve@@GLIBC_2.0_initscanf@@GLIBC_2.0_Z10print_menuv_start_ZNKSsixEj@@GLIBCXX_3.4__fini_array_start__libc_csu_init__bss_startmain_ZNKSs4sizeEv@@GLIBCXX_3.4__libc_start_main@@GLIBC_2.0__init_array_enddata_startprintf@@GLIBC_2.0_fini_ZSt3minIjERKT_S2_S2__edata__i686.get_pc_thunk.bx_GLOBAL_OFFSET_TABLE__end__init_array_start_IO_stdin_used__data_start_Jv_RegisterClasses__gxx_personality_v0@@CXXABI_1.3_ZNSt8ios_base4InitD1Ev@@GLIBCXX_3.4__gmon_start__pi-calculator/COPYING0000644000175000001440000004313310360005715014541 0ustar sebastianusers GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. pi-calculator/README0000644000175000001440000000316610365256631014402 0ustar sebastianusersAbout the project: | ==================== The main goal of the project is to calculate Pi. Project website : http://pi.kickino.org/ | http://nanofortnight.org/Pi Project on SV : https://savannah.nongnu.org/projects/pi-calculator/ CVS : https://savannah.nongnu.org/cvs/?group=pi-calculator (anonymouse) : cvs -z3 -d:pserver:anonymous@cvs.savannah.nongnu.org:/sources/pi-calculator co pi-calculator (for SV member): cvs -z3 -d @cvs.savannah.nongnu.org:/sources/pi-calculator co pi-calculator References: | ============= (English) http://en.wikipedia.org/wiki/Pi (German) http://de.wikipedia.org/wiki/Kreiszahl [Content of the Wikipedia was released under the terms of the GNU FDL] Thanks: | ========= Special thanks to Pascal Fricke, who helped me to understand almost all of the algorithms to calculate Pi. Usefull Links of this topic: | ============================== Have a look at the source code of each algorithm, the URIs of the Wikipedia articels were included there. Furthermore have a look at: # Pi to one million decimal places (http://3.141592653589793238462643383279502884197169399375105820974944592.com/) # Pi to 206 billion decimal places (http://pi.lacim.uqam.ca/piDATA/pi206billion.txt) # Table of current records for the computation of constants (http://pi.lacim.uqam.ca/eng/records_en.html) # Search the first four billion binary digits of Pi for a string (http://pi.nersc.gov/) # David H. Bailey website (http://crd.lbl.gov/~dhbailey/) describs the BBP algorithm # Kanada Laboratory home page (http://www.super-computing.org/) includes Pi to one trillion digits (http://www.super-computing.org/pi_current.html)