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/0000755000175000001440000000000010365750243014301 5ustar sebastianuserspi-calculator/src/CVS/0000755000175000001440000000000010365646116014737 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/Entries0000644000175000001440000000161010365646116016271 0ustar sebastianusers/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// /Makefile/1.3/Tue Jan 24 22:29:00 2006// /main.c/1.2/Wed Jan 25 09:16:11 2006// /bbp.h/1.2/Wed Jan 25 09:59:46 2006// /francois_viete.h/1.2/Wed Jan 25 09:59:51 2006// /gottfried_wilhelm_leibniz.h/1.2/Wed Jan 25 09:59:55 2006// /johann_heinrich_lambert.h/1.2/Wed Jan 25 10:00:00 2006// /john_wallis.h/1.2/Wed Jan 25 10:00:05 2006// /leonhard_euler.h/1.2/Wed Jan 25 10:00:11 2006// /mymath.h/1.2/Wed Jan 25 10:00:18 2006// /srinivasa_aiyangar_ramanujan.h/1.2/Wed Jan 25 10:00:22 2006// D pi-calculator/src/mymath.h0000644000175000001440000000366410365646062015765 0ustar sebastianusers/*********************************************************/ /* Mathematic functions (needed for the Pi calculation) */ /* http://en.wikipedia.org/wiki/Exponential_function */ /* http://en.wikipedia.org/wiki/Factorial */ /* ----------------------------------------------------- */ /* Autor: Sebastian Wieseler */ /* Mail: programming@kickino.org */ /* Web: http://www.kickino.org/ */ /* IRC: #uscc @ irc.forkbomb.ch:6668 (ssl only) */ /* ----------------------------------------------------- */ /* Date: 2006-01-24 */ /* Last Change: 2006-01-25 */ /* 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. */ long double exponential(long double a, long double b) { if (b==0) return 1; /* a^0 = 1 */ else exponential(a*a,b-1); return a; } long double factorial(long double i) { if(i==0) return 1; else return i*factorial(i-1); } pi-calculator/src/Makefile0000644000175000001440000000120510365750142015735 0ustar sebastianusersSHELL = /bin/sh .SUFFIXES: .c .o CPPFLAGS= CFLAGS = -g -pedantic -Wall -ggdb3 -O2 LDFLAGS= -lm ALL_CFLAGS = -I. $(CFLAGS) # Common prefix for installation directories. # NOTE: This directory must exist when you start the install. prefix = /usr/local datarootdir = $(prefix)/share datadir = $(datarootdir) exec_prefix = $(prefix) # Where to put the executable for the command `gcc'. bindir = $(exec_prefix)/bin # Where to put the directories used by the compiler. libexecdir = $(exec_prefix)/libexec # Where to put the Info files. infodir = $(datarootdir)/info .c.o: $(CC) -c $(CPPFLAGS) $(ALL_CFLAGS) $< all: main clean: rm -rf *.o main pi-calculator/src/main0000755000175000001440000011330310365750144015154 0ustar sebastianusersELF44 ($!444444        HHH Qtde(/lib/ld-linux.so.2GNU =^?L\sE9.ydT  libm.so.6_Jv_RegisterClasses__gmon_start__sqrtlibc.so.6putcharprintf__strtol_internalscanf_IO_stdin_used__libc_start_mainGLIBC_2.0 ii 3ii   U 5%%h%h%h% h%h %h(1^PTRhhPQVh@US[PtЋ]ÐU=$t  ҡ u$ÐUt!t$l{ÐUmٞt|$ m<$mzÐ&U mtm<$mzÉUX}|$ @T$D$}$Wm$X-p L=PTXm}|$}|$mmJÍt&UʃX}&|$}\$$immrAm} X]Ezt}$kmÍU8Em ٞw}}|$$mmÍ'U8Am$?|$}$y=\|$m|$mm}sUW1VS<$P]Ez u Ðt&$Ít&zÉUHP}H&m<$u h$ym=P}|$m|$mm}sÍv'UWVSlm}}]u}]u}mm$X \|$}}=P}|$\mmms؃l[^_]؃l[^_]Ð&US]E UMw $t&E E[]EU M[]EU M[]+EU M[]EU M[]EU M[]EU M[]EU M[]t&'UЏD$$]$ D$HÍ&'UHD$$$D$$D$$͎D$$L$$T$$ D$$ SÉ'US$] },$lT$O$!ED$ $D$'$$ED$m|$E$(D$$>\$]1Ít&C1ɺ L$ 1ɉT$L$$EC1҉T$ 1ɻ \$L$$uP$}sUWV1S Ô)9s׍&'F9r [^_]ÍU$B6t$)puO$t$]Nu$ÐUS  ЋuX[]ÐUS[÷R]%6.0Lf: %.60Lf %6.0Lf: %.60f %6.0Lf: %.62Lf %6.0d: %.62Lf %s %s 2) Euler formula 3) Lambert formula 4) Leibnitz formula 5) Ramanujan formula 6) Viete formula 7) Wallis formula %s%d%Lf The faithfull Pi is:%s %.62f A@@@@,FD?@?R 2?;f?;f?-DT! @You should enter a number from above.PI - Calculator - (C) 2005,2006 Sebastian Wieseler [GPL]======================================================== 1) Bailey-Borwein-Plouffe formulaWhich algorithm do you want to use for the calculation? How many iterations of the algorithm should be passed through? %5Պ3 ` 4hD 00(oooԂ ΃ރ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),4` "$Juexponentialfactorialbbp[leonhard_eulerlambert_algojohann_heinrich_lambertgottfried_wilhelm_leibnizBsrinivasa_aiyangar_ramanujanviete_formulafrancois_vietejohn_wallis(run_algobprint_headertprint_menumain/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.2DKFintXA;Z~]1hK7. S# # #U # Q # #l #4 # # ^ #$ #(h #, #0 #4r "S#8G &S#< (s#@ ,7#D -E#F* .#G0 2#H ;#L A7#T B7#XO DS#\ F#`?   + # #  S#K  D  3f&Ua%b%\z =0Ui/[bbp ( U 'i )_pi )h!!%zU!$i!&]pi!&X'*ӆUn')]i')^k'5@U'4i'6hB;(%@ڇU($(&]i('SR)$U)#i)%X)%Hu*8^Un*7[*A`։U*@*Chi*DX(E+%U+$i+&]+&XbU,0EU,/SS,/ PQR,@PU`,G7UA,SS@DU,RS,RAS,USt,VhGZPgz3Pg3zgcS9L~J9zJAJS ~96/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%C% $ > $ > : ; I I : ;  : ;I8  &I : ; : ; I8 I !I/ .? : ; ' I@ : ; I .? : ; ' @ : ; I 4: ; I .? : ; ' @ 4: ; I .? : ; @ 11 11.? : ;' I : ;I4: ; I? < %p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrti.S42,Wd`",: ,Wdd,,-:C /usr/include/usr/include/sys/usr/include/gnu/usr/lib/gcc/i686-pc-linux-gnu/3.4.4/include/usr/include/bitsstdio.hfeatures.hcdefs.hstubs.hstddef.htypes.hwordsize.htypesizes.hlibio.h_G_config.hwchar.hwchar.hgconv.hstdarg.hstdio_lim.hsys_errlist.hstdio.hstdlib.htypes.htime.hendian.hendian.hselect.hselect.hsigset.htime.hsysmacros.hpthreadtypes.hsched.halloca.hmymath.hbbp.hleonhard_euler.hmath.hhuge_val.hmathdef.hmathcalls.hmathinline.hjohann_heinrich_lambert.hgottfried_wilhelm_leibniz.hsrinivasa_aiyangar_ramanujan.hfrancois_viete.hjohn_wallis.hmain.c%*U:e:z+M0*V,/. s9*X*pJ*pHFr!z-(.D:|-3 'cd,z.z1)4 (n*='YZy*sV|)*Xzqz?w9*,*U:t'^dgJef|pV:+_&*:*X7:p8:,4G8: (T'zU v+V w+Vx+Vy+Vz+V&TV%TVHHHHHHgqW XH.HZ9>9p /var/tmp/portage/glibc-2.3.5-r2/work/build-default-i686-pc-linux-gnu-linuxthreads/csucrtn.SJ:u | 8AD .AD  AD AF SAB `AD @AD HAD F^AD `vAB AD HAB AP2AG AG @AB D__off_t_IO_read_ptr_chaindecision_algo_shortbuf_IO_buf_baselong long unsigned intlong long intexponential_fileno__endptr_IO_read_end__quad_tstrtol_flags_IO_buf_end_cur_column_old_offsetmain_IO_markerstdin_IO_write_ptr_sbufone_over_pishort unsigned intprint_headerleonhard_euler_lockstdoutfactorial_flags2_moderun_algo_IO_save_base_IO_write_endlong double_IO_lock_t_IO_FILEmain.c__nptr_pos_markers__baseunsigned chartwo_over_pishort int_vtable_offsetdecision_passesquarter_of_pisrinivasa_aiyangar_ramanujan_next__off64_tgottfried_wilhelm_leibniz_IO_read_baseatoi_IO_save_endviete_formula__pad1__pad2_unused2lambert_algoargv_IO_backup_basefrancois_vieteGNU C 3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)floatatolargc/home/sebastian/website/html/pi/pi-calculator/srcjohn_wallis_IO_write_baseprint_menujohann_heinrich_lambert__STDC_HOSTED__ 1__GNUC__ 3__GNUC_MINOR__ 4__GNUC_PATCHLEVEL__ 4__SIZE_TYPE__ unsigned int__PTRDIFF_TYPE__ int__WCHAR_TYPE__ long int__WINT_TYPE__ unsigned int __GXX_ABI_VERSION 1002 __SCHAR_MAX__ 127 __SHRT_MAX__ 32767 __INT_MAX__ 2147483647 __LONG_MAX__ 2147483647L__LONG_LONG_MAX__ 9223372036854775807LL__WCHAR_MAX__ 2147483647__CHAR_BIT__ 8__FLT_EVAL_METHOD__ 2__FLT_RADIX__ 2__FLT_MANT_DIG__ 24__FLT_DIG__ 6__FLT_MIN_EXP__ (-125)__FLT_MIN_10_EXP__ (-37)__FLT_MAX_EXP__ 128__FLT_MAX_10_EXP__ 38__FLT_MAX__ 3.40282347e+38F__FLT_MIN__ 1.17549435e-38F__FLT_EPSILON__ 1.19209290e-7F__FLT_DENORM_MIN__ 1.40129846e-45F__FLT_HAS_INFINITY__ 1__FLT_HAS_QUIET_NAN__ 1__DBL_MANT_DIG__ 53 __DBL_DIG__ 15!__DBL_MIN_EXP__ (-1021)"__DBL_MIN_10_EXP__ (-307)#__DBL_MAX_EXP__ 1024$__DBL_MAX_10_EXP__ 308%__DBL_MAX__ 1.7976931348623157e+308&__DBL_MIN__ 2.2250738585072014e-308'__DBL_EPSILON__ 2.2204460492503131e-16(__DBL_DENORM_MIN__ 4.9406564584124654e-324)__DBL_HAS_INFINITY__ 1*__DBL_HAS_QUIET_NAN__ 1+__LDBL_MANT_DIG__ 64,__LDBL_DIG__ 18-__LDBL_MIN_EXP__ (-16381).__LDBL_MIN_10_EXP__ (-4931)/__LDBL_MAX_EXP__ 163840__LDBL_MAX_10_EXP__ 49321__DECIMAL_DIG__ 212__LDBL_MAX__ 1.18973149535723176502e+4932L3__LDBL_MIN__ 3.36210314311209350626e-4932L4__LDBL_EPSILON__ 1.08420217248550443401e-19L5__LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L6__LDBL_HAS_INFINITY__ 17__LDBL_HAS_QUIET_NAN__ 18__REGISTER_PREFIX__ 9__USER_LABEL_PREFIX__ :__VERSION__ "3.4.4 (Gentoo 3.4.4-r1, ssp-3.4.4-1.0, pie-8.7.8)";__OPTIMIZE__ 1<__FINITE_MATH_ONLY__ 0?__i386 1@__i386__ 1Ai386 1B__tune_i686__ 1C__tune_pentiumpro__ 1D__gnu_linux__ 1E__linux 1F__linux__ 1Glinux 1H__unix 1I__unix__ 1Junix 1N__ELF__ 1#_STDIO_H 1_FEATURES_H 1Z__USE_ISOC99[__USE_POSIX\__USE_POSIX2]__USE_POSIX199309^__USE_POSIX199506___USE_XOPEN`__USE_XOPEN_EXTENDEDa__USE_UNIX98b__USE_XOPEN2Kc__USE_LARGEFILEd__USE_LARGEFILE64e__USE_FILE_OFFSET64f__USE_BSDg__USE_SVIDh__USE_MISCi__USE_GNUj__USE_REENTRANTk__USE_FORTIFY_LEVELl__FAVOR_BSDm__KERNEL_STRICT_NAMESr__KERNEL_STRICT_NAMES v__USE_ANSI 1__GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))_BSD_SOURCE 1_SVID_SOURCE 1_POSIX_SOURCE 1_POSIX_C_SOURCE 199506L__USE_POSIX 1__USE_POSIX2 1__USE_POSIX199309 1__USE_POSIX199506 1__USE_MISC 1__USE_BSD 1__USE_SVID 1__STDC_IEC_559__ 1__STDC_IEC_559_COMPLEX__ 1__STDC_ISO_10646__ 200009L__GNU_LIBRARY____GNU_LIBRARY__ 6__GLIBC__ 2__GLIBC_MINOR__ 3__GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))__GLIBC_HAVE_LONG_LONG 1_SYS_CDEFS_H 1#__P$__PMT.__THROW __attribute__ ((__nothrow__))/__NTH(fct) __attribute__ ((__nothrow__)) fctI__P(args) argsJ__PMT(args) argsO__CONCAT(x,y) x ## yP__STRING(x) #xS__ptr_t void *T__long_double_t long double\__BEGIN_DECLS ]__END_DECLS q__BEGIN_NAMESPACE_STD r__END_NAMESPACE_STD s__USING_NAMESPACE_STD(name) t__BEGIN_NAMESPACE_C99 u__END_NAMESPACE_C99 v__USING_NAMESPACE_C99(name) |__bounded }__unbounded ~__ptrvalue __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)__bos0(ptr) __builtin_object_size (ptr, 0)__flexarr []__REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias))__REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW__ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)__ASMNAME2(prefix,cname) __STRING (prefix) cname__attribute_malloc__ __attribute__ ((__malloc__))__attribute_pure__ __attribute__ ((__pure__))__attribute_used__ __attribute__ ((__used__))__attribute_noinline__ __attribute__ ((__noinline__))__attribute_deprecated__ __attribute__ ((__deprecated__))__attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))__attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b)))__nonnull(params) __attribute__ ((__nonnull__ params))__restrict_arr __restrict__USE_EXTERN_INLINES 1 __stub___kernel_cosl  __stub___kernel_sinl  __stub___kernel_tanl  __stub_add_key __stub_chflags __stub_epoll_create __stub_epoll_ctl __stub_epoll_wait __stub_fattach __stub_fchflags __stub_fdetach __stub_gtty __stub_keyctl __stub_lchmod __stub_lutimes __stub_mq_setattr __stub_mq_timedreceive __stub_mq_timedsend __stub_remap_file_pages __stub_request_key __stub_revoke __stub_setlogin  __stub_sstk !__stub_stty  __need_size_t !__need_NULL "__size_t__ __SIZE_T__ _SIZE_T _SYS_SIZE_T_H _T_SIZE_ _T_SIZE __SIZE_T _SIZE_T_ _BSD_SIZE_T_ _SIZE_T_DEFINED_ _SIZE_T_DEFINED _BSD_SIZE_T_DEFINED_ _SIZE_T_DECLARED ___int_size_t_h _GCC_SIZE_T _SIZET_ __size_t __need_size_tNULLNULL ((void *)0)__need_NULL$_BITS_TYPES_H 1__WORDSIZE 32__need_size_t __need_size_t__need_NULLf__S16_TYPE short intg__U16_TYPE unsigned short inth__S32_TYPE inti__U32_TYPE unsigned intj__SLONGWORD_TYPE long intk__ULONGWORD_TYPE unsigned long intm__SQUAD_TYPE __quad_tn__UQUAD_TYPE __u_quad_to__SWORD_TYPE intp__UWORD_TYPE unsigned intq__SLONG32_TYPE long intr__ULONG32_TYPE unsigned long ints__S64_TYPE __quad_tt__U64_TYPE __u_quad_t_BITS_TYPESIZES_H 1__DEV_T_TYPE __UQUAD_TYPE__UID_T_TYPE __U32_TYPE __GID_T_TYPE __U32_TYPE!__INO_T_TYPE __ULONGWORD_TYPE"__INO64_T_TYPE __UQUAD_TYPE#__MODE_T_TYPE __U32_TYPE$__NLINK_T_TYPE __UWORD_TYPE%__OFF_T_TYPE __SLONGWORD_TYPE&__OFF64_T_TYPE __SQUAD_TYPE'__PID_T_TYPE __S32_TYPE(__RLIM_T_TYPE __ULONGWORD_TYPE)__RLIM64_T_TYPE __UQUAD_TYPE*__BLKCNT_T_TYPE __SLONGWORD_TYPE+__BLKCNT64_T_TYPE __SQUAD_TYPE,__FSBLKCNT_T_TYPE __ULONGWORD_TYPE-__FSBLKCNT64_T_TYPE __UQUAD_TYPE.__FSFILCNT_T_TYPE __ULONGWORD_TYPE/__FSFILCNT64_T_TYPE __UQUAD_TYPE0__ID_T_TYPE __U32_TYPE1__CLOCK_T_TYPE __SLONGWORD_TYPE2__TIME_T_TYPE __SLONGWORD_TYPE3__USECONDS_T_TYPE __U32_TYPE4__SUSECONDS_T_TYPE __SLONGWORD_TYPE5__DADDR_T_TYPE __S32_TYPE6__SWBLK_T_TYPE __SLONGWORD_TYPE7__KEY_T_TYPE __S32_TYPE8__CLOCKID_T_TYPE __S32_TYPE9__TIMER_T_TYPE __S32_TYPE:__BLKSIZE_T_TYPE __SLONGWORD_TYPE;__FSID_T_TYPE struct { int __val[2]; }<__SSIZE_T_TYPE __SWORD_TYPE?__FD_SETSIZE 1024__STD_TYPE __extension__ typedef__STD_TYPE%__need_FILE &__need___FILE 6__FILE_defined 18__need_FILE@____FILE_defined 1B__need___FILEF_STDIO_USES_IOSTREAM H _IO_STDIO_H  _G_config_h 1 __need_size_t  __need_wchar_t  __need_wint_t  __need_NULL __need_size_t__wchar_t__ __WCHAR_T__ _WCHAR_T _T_WCHAR_ _T_WCHAR __WCHAR_T _WCHAR_T_ _BSD_WCHAR_T_ _WCHAR_T_DEFINED_ _WCHAR_T_DEFINED _WCHAR_T_H ___int_wchar_t_h __INT_WCHAR_T_H _GCC_WCHAR_T _WCHAR_T_DECLARED _BSD_WCHAR_T___need_wchar_t_WINT_T __need_wint_tNULLNULL ((void *)0)__need_NULL__need_mbstate_t  /__need_wint_t 0__need_wint_t__need_NULL2 _BITS_WCHAR_H 1__WCHAR_MIN (-2147483647l - 1l)__WCHAR_MAX (2147483647l)J__mbstate_t_defined 1V__need_mbstate_t_G_size_t size_t$_G_ssize_t __ssize_t%_G_off_t __off_t&_G_off64_t __off64_t'_G_pid_t __pid_t(_G_uid_t __uid_t)_G_wchar_t wchar_t*_G_wint_t wint_t+_G_stat64 stat64, _GCONV_H 1__need_mbstate_t  /__need_wint_t 0__need_wint_t__need_NULLV__need_mbstate_t__need_size_t __need_wchar_t __need_size_t__need_wchar_t__need_NULL"__UNKNOWN_10646_CHAR ((wchar_t) 0xfffd)<_G_HAVE_BOOL 1@_G_HAVE_ATEXIT 1A_G_HAVE_SYS_CDEFS 1B_G_HAVE_SYS_WAIT 1C_G_NEED_STDARG_H 1D_G_va_list __gnuc_va_listF_G_HAVE_PRINTF_FP 1G_G_HAVE_MMAP 1H_G_HAVE_MREMAP 1I_G_HAVE_LONG_DOUBLE_IO 1J_G_HAVE_IO_FILE_OPEN 1K_G_HAVE_IO_GETLINE_INFO 1M_G_IO_IO_FILE_VERSION 0x20001O_G_OPEN64 __open64P_G_LSEEK64 __lseek64Q_G_MMAP64 __mmap64R_G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf)U_G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)W_G_BUFSIZ 8192Z_G_NAMES_HAVE_UNDERSCORE 0[_G_VTABLE_LABEL_HAS_LENGTH 1\_G_USING_THUNKS 1]_G_VTABLE_LABEL_PREFIX "__vt_"^_G_VTABLE_LABEL_PREFIX_ID __vt_b_G_ARGS(ARGLIST) ARGLIST"_IO_pos_t _G_fpos_t#_IO_fpos_t _G_fpos_t$_IO_fpos64_t _G_fpos64_t%_IO_size_t _G_size_t&_IO_ssize_t _G_ssize_t'_IO_off_t _G_off_t(_IO_off64_t _G_off64_t)_IO_pid_t _G_pid_t*_IO_uid_t _G_uid_t+_IO_iconv_t _G_iconv_t,_IO_HAVE_SYS_WAIT _G_HAVE_SYS_WAIT-_IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE._IO_BUFSIZ _G_BUFSIZ/_IO_va_list _G_va_list0_IO_wint_t _G_wint_t4__need___va_list 5%__need___va_list*__GNUC_VA_LIST 7_IO_va_list8_IO_va_list __gnuc_va_listL_PARAMS(protos) __P(protos)T_IO_UNIFIED_JUMPTABLES 1ZEOF (-1)i_IOS_INPUT 1j_IOS_OUTPUT 2k_IOS_ATEND 4l_IOS_APPEND 8m_IOS_TRUNC 16n_IOS_NOCREATE 32o_IOS_NOREPLACE 64p_IOS_BIN 128x_IO_MAGIC 0xFBAD0000y_OLD_STDIO_MAGIC 0xFABC0000z_IO_MAGIC_MASK 0xFFFF0000{_IO_USER_BUF 1|_IO_UNBUFFERED 2}_IO_NO_READS 4~_IO_NO_WRITES 8_IO_EOF_SEEN 0x10_IO_ERR_SEEN 0x20_IO_DELETE_DONT_CLOSE 0x40_IO_LINKED 0x80_IO_IN_BACKUP 0x100_IO_LINE_BUF 0x200_IO_TIED_PUT_GET 0x400_IO_CURRENTLY_PUTTING 0x800_IO_IS_APPENDING 0x1000_IO_IS_FILEBUF 0x2000_IO_BAD_SEEN 0x4000_IO_USER_LOCK 0x8000_IO_FLAGS2_MMAP 1_IO_FLAGS2_NOTCANCEL 2_IO_SKIPWS 01_IO_LEFT 02_IO_RIGHT 04_IO_INTERNAL 010_IO_DEC 020_IO_OCT 040_IO_HEX 0100_IO_SHOWBASE 0200_IO_SHOWPOINT 0400_IO_UPPERCASE 01000_IO_SHOWPOS 02000_IO_SCIENTIFIC 04000_IO_FIXED 010000_IO_UNITBUF 020000_IO_STDIO 040000_IO_DONT_CLOSE 0100000_IO_BOOLALPHA 0200000_IO_file_flags _flags__HAVE_COLUMN _IO_stdin ((_IO_FILE*)(&_IO_2_1_stdin_))_IO_stdout ((_IO_FILE*)(&_IO_2_1_stdout_))_IO_stderr ((_IO_FILE*)(&_IO_2_1_stderr_))_IO_BE(expr,res) __builtin_expect (expr, res)_IO_getc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++)_IO_peekc_unlocked(_fp) (_IO_BE ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end, 0) && __underflow (_fp) == EOF ? EOF : *(unsigned char *) (_fp)->_IO_read_ptr)_IO_putc_unlocked(_ch,_fp) (_IO_BE ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end, 0) ? __overflow (_fp, (unsigned char) (_ch)) : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch)))_IO_getwc_unlocked(_fp) (_IO_BE ((_fp)->_wide_data->_IO_read_ptr >= (_fp)->_wide_data->_IO_read_end, 0) ? __wuflow (_fp) : (_IO_wint_t) *(_fp)->_wide_data->_IO_read_ptr++)_IO_putwc_unlocked(_wch,_fp) (_IO_BE ((_fp)->_wide_data->_IO_write_ptr >= (_fp)->_wide_data->_IO_write_end, 0) ? __woverflow (_fp, _wch) : (_IO_wint_t) (*(_fp)->_wide_data->_IO_write_ptr++ = (_wch)))_IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0)_IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0)_IO_PENDING_OUTPUT_COUNT(_fp) ((_fp)->_IO_write_ptr - (_fp)->_IO_write_base)_IO_peekc(_fp) _IO_peekc_unlocked (_fp)_IO_flockfile(_fp) _IO_funlockfile(_fp) _IO_ftrylockfile(_fp) _IO_cleanup_region_start(_fct,_fp) _IO_cleanup_region_end(_Doit) b_IOFBF 0c_IOLBF 1d_IONBF 2iBUFSIZ _IO_BUFSIZvSEEK_SET 0wSEEK_CUR 1xSEEK_END 2}P_tmpdir "/tmp"L_tmpnam 20TMP_MAX 238328FILENAME_MAX 4096L_ctermid 9L_cuserid 9#FOPEN_MAX$FOPEN_MAX 16stdin stdinstdout stdoutstderr stderrgetc(_fp) _IO_getc (_fp)putc(_ch,_fp) _IO_putc (_ch, _fp)__STDIO_INLINE extern __inlinefread_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ char *__ptr = (char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) { int __c = _IO_getc_unlocked (__stream); if (__c == EOF) break; *__ptr++ = __c; } ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fread_unlocked (ptr, size, n, stream))))fwrite_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ const char *__ptr = (const char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) if (_IO_putc_unlocked (*__ptr++, __stream) == EOF) break; ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fwrite_unlocked (ptr, size, n, stream))))__STDIO_INLINE$__need_size_t __need_wchar_t __need_NULL !__need_size_t__need_wchar_tNULLNULL ((void *)0)__need_NULL&_STDLIB_H 1o__ldiv_t_defined 1RAND_MAX 2147483647EXIT_FAILURE 1EXIT_SUCCESS 0MB_CUR_MAX (__ctype_get_mb_cur_max ())__strtol_internal_defined 1__strtoul_internal_defined 1__strtoll_internal_defined 1__strtoull_internal_defined 1_SYS_TYPES_H 1*__u_char_defined 6__ino_t_defined ?__dev_t_defined D__gid_t_defined I__mode_t_defined N__nlink_t_defined S__uid_t_defined \__off_t_defined e__pid_t_defined j__id_t_defined o__ssize_t_defined v__daddr_t_defined |__key_t_defined __need_time_t __need_timer_t __need_clockid_t C__need_clock_tF__time_t_defined 1S__need_time_tW__clockid_t_defined 1___clockid_time_tc__timer_t_defined 1k__need_timer_t}__need_timespec__need_size_t __need_size_t__need_NULL__intN_t(N,MODE) typedef int int ##N ##_t __attribute__ ((__mode__ (MODE)))__u_intN_t(N,MODE) typedef unsigned int u_int ##N ##_t __attribute__ ((__mode__ (MODE)))__int8_t_defined __BIT_TYPES_DEFINED__ 1_ENDIAN_H 1 __LITTLE_ENDIAN 1234!__BIG_ENDIAN 4321"__PDP_ENDIAN 3412%__BYTE_ORDER __LITTLE_ENDIAN*__FLOAT_WORD_ORDER __BYTE_ORDER.LITTLE_ENDIAN __LITTLE_ENDIAN/BIG_ENDIAN __BIG_ENDIAN0PDP_ENDIAN __PDP_ENDIAN1BYTE_ORDER __BYTE_ORDER5__LONG_LONG_PAIR(HI,LO) LO, HI_SYS_SELECT_H 1__FD_ZERO(fdsp) do { int __d0, __d1; __asm__ __volatile__ ("cld; rep; stosl" : "=c" (__d0), "=D" (__d1) : "a" (0), "0" (sizeof (fd_set) / sizeof (__fd_mask)), "1" (&__FDS_BITS (fdsp)[0]) : "memory"); } while (0)%__FD_SET(fd,fdsp) __asm__ __volatile__ ("btsl %1,%0" : "=m" (__FDS_BITS (fdsp)[__FDELT (fd)]) : "r" (((int) (fd)) % __NFDBITS) : "cc","memory")*__FD_CLR(fd,fdsp) __asm__ __volatile__ ("btrl %1,%0" : "=m" (__FDS_BITS (fdsp)[__FDELT (fd)]) : "r" (((int) (fd)) % __NFDBITS) : "cc","memory")/__FD_ISSET(fd,fdsp) (__extension__ ({register char __result; __asm__ __volatile__ ("btl %1,%2 ; setcb %b0" : "=q" (__result) : "r" (((int) (fd)) % __NFDBITS), "m" (__FDS_BITS (fdsp)[__FDELT (fd)]) : "cc"); __result; }))"_SIGSET_H_types 1_SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))%__sigset_t_defined *__need_time_t +__need_timespec ,C__need_clock_tS__need_time_t___clockid_time_tk__need_timer_tr__timespec_defined 1}__need_timespec-__need_timeval .>__need_timeval@_STRUCT_TIMEVAL 12__suseconds_t_defined :__NFDBITS;__FDELT<__FDMASK>__NFDBITS (8 * sizeof (__fd_mask))?__FDELT(d) ((d) / __NFDBITS)@__FDMASK(d) ((__fd_mask) 1 << ((d) % __NFDBITS))L__FDS_BITS(set) ((set)->__fds_bits)QFD_SETSIZE __FD_SETSIZEXNFDBITS __NFDBITS]FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp)^FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp)_FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp)`FD_ZERO(fdsetp) __FD_ZERO (fdsetp)_SYS_SYSMACROS_H 1@major(dev) gnu_dev_major (dev)Aminor(dev) gnu_dev_minor (dev)Bmakedev(maj,min) gnu_dev_makedev (maj, min)__blkcnt_t_defined __fsblkcnt_t_defined __fsfilcnt_t_defined _BITS_PTHREADTYPES_H 1__need_schedparam Q__defined_schedparam 1W__need_schedparam$_PTHREAD_DESCR_DEFINED __malloc_and_calloc_defined _ALLOCA_H 1__need_size_t __need_size_t__need_NULLalloca$alloca(size) __builtin_alloca (size)__COMPAR_FN_T __need_malloc_and_calloc%' (!#"_MATH_H 1!#HUGE_VAL (__builtin_huge_val()).$5__MATHCALL(function,suffix,args) __MATHDECL (_Mdouble_,function,suffix, args)7__MATHDECL(type,function,suffix,args) __MATHDECL_1(type, function,suffix, args); __MATHDECL_1(type, __CONCAT(__,function),suffix, args):__MATHCALLX(function,suffix,args,attrib) __MATHDECLX (_Mdouble_,function,suffix, args, attrib)<__MATHDECLX(type,function,suffix,args,attrib) __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib)?__MATHDECL_1(type,function,suffix,args) extern type __MATH_PRECNAME(function,suffix) args __THROWB_Mdouble_ doubleC__MATH_PRECNAME(name,r) __CONCAT(name,r)D_Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_STDE_Mdouble_END_NAMESPACE __END_NAMESPACE_STDF%G_Mdouble_H_Mdouble_BEGIN_NAMESPACEI_Mdouble_END_NAMESPACEJ__MATH_PRECNAMES_Mfloat_ floatU_Mdouble_ _Mfloat_W__MATH_PRECNAME(name,r) name ##f ##r[_Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99\_Mdouble_END_NAMESPACE __END_NAMESPACE_C99]%^_Mdouble___Mdouble_BEGIN_NAMESPACE`_Mdouble_END_NAMESPACEa__MATH_PRECNAMEh_Mlong_double_ long doublej_Mdouble_ _Mlong_double_l__MATH_PRECNAME(name,r) name ##l ##rp_Mdouble_BEGIN_NAMESPACE __BEGIN_NAMESPACE_C99q_Mdouble_END_NAMESPACE __END_NAMESPACE_C99r%s_Mdouble_t_Mdouble_BEGIN_NAMESPACEu_Mdouble_END_NAMESPACEv__MATH_PRECNAME{__MATHDECL_1|__MATHDECL}__MATHCALLX_TLOSS 1.41484755040568800000e+16DOMAIN 1SING 2OVERFLOW 3UNDERFLOW 4TLOSS 5PLOSS 6HUGE 3.40282347e+38FM_E 2.7182818284590452354M_LOG2E 1.4426950408889634074M_LOG10E 0.43429448190325182765M_LN2 0.69314718055994530942M_LN10 2.30258509299404568402M_PI 3.14159265358979323846M_PI_2 1.57079632679489661923M_PI_4 0.78539816339744830962M_1_PI 0.31830988618379067154M_2_PI 0.63661977236758134308M_2_SQRTPI 1.12837916709551257390M_SQRT2 1.41421356237309504880M_SQRT1_2 0.70710678118654752440&__MATH_INLINE extern __inline__inline_mathop(func,op) __inline_mathop_ (double, func, op) __inline_mathop_ (float, __CONCAT(func,f), op) __inline_mathop_ (long double, __CONCAT(func,l), op)__inline_mathopNP(func,op) __inline_mathopNP_ (double, func, op) __inline_mathopNP_ (float, __CONCAT(func,f), op) __inline_mathopNP_ (long double, __CONCAT(func,l), op)__inline_mathop_(float_type,func,op) __inline_mathop_decl_ (float_type, func, op, "0" (__x))__inline_mathopNP_(float_type,func,op) __inline_mathop_declNP_ (float_type, func, op, "0" (__x))__inline_mathop_decl(func,op,params...) __inline_mathop_decl_ (double, func, op, params) __inline_mathop_decl_ (float, __CONCAT(func,f), op, params) __inline_mathop_decl_ (long double, __CONCAT(func,l), op, params)__inline_mathop_declNP(func,op,params...) __inline_mathop_declNP_ (double, func, op, params) __inline_mathop_declNP_ (float, __CONCAT(func,f), op, params) __inline_mathop_declNP_ (long double, __CONCAT(func,l), op, params)__inline_mathop_decl_(float_type,func,op,params...) __MATH_INLINE float_type func (float_type) __THROW; __inline_mathop_declNP_ (float_type, func, op, params)__inline_mathop_declNP_(float_type,func,op,params...) __MATH_INLINE float_type __NTH (func (float_type __x)) { register float_type __result; __asm __volatile__ (op : "=t" (__result) : params); return __result; }__inline_mathcode(func,arg,code) __inline_mathcode_ (double, func, arg, code) __inline_mathcode_ (float, __CONCAT(func,f), arg, code) __inline_mathcode_ (long double, __CONCAT(func,l), arg, code)__inline_mathcodeNP(func,arg,code) __inline_mathcodeNP_ (double, func, arg, code) __inline_mathcodeNP_ (float, __CONCAT(func,f), arg, code) __inline_mathcodeNP_ (long double, __CONCAT(func,l), arg, code)__inline_mathcode2(func,arg1,arg2,code) __inline_mathcode2_ (double, func, arg1, arg2, code) __inline_mathcode2_ (float, __CONCAT(func,f), arg1, arg2, code) __inline_mathcode2_ (long double, __CONCAT(func,l), arg1, arg2, code)__inline_mathcodeNP2(func,arg1,arg2,code) __inline_mathcodeNP2_ (double, func, arg1, arg2, code) __inline_mathcodeNP2_ (float, __CONCAT(func,f), arg1, arg2, code) __inline_mathcodeNP2_ (long double, __CONCAT(func,l), arg1, arg2, code)__inline_mathcode3(func,arg1,arg2,arg3,code) __inline_mathcode3_ (double, func, arg1, arg2, arg3, code) __inline_mathcode3_ (float, __CONCAT(func,f), arg1, arg2, arg3, code) __inline_mathcode3_ (long double, __CONCAT(func,l), arg1, arg2, arg3, code)__inline_mathcodeNP3(func,arg1,arg2,arg3,code) __inline_mathcodeNP3_ (double, func, arg1, arg2, arg3, code) __inline_mathcodeNP3_ (float, __CONCAT(func,f), arg1, arg2, arg3, code) __inline_mathcodeNP3_ (long double, __CONCAT(func,l), arg1, arg2, arg3, code)__inline_mathcode_(float_type,func,arg,code) __MATH_INLINE float_type func (float_type) __THROW; __inline_mathcodeNP_(float_type, func, arg, code)__inline_mathcodeNP_(float_type,func,arg,code) __MATH_INLINE float_type __NTH (func (float_type arg)) { code; }__inline_mathcode2_(float_type,func,arg1,arg2,code) __MATH_INLINE float_type func (float_type, float_type) __THROW; __inline_mathcodeNP2_ (float_type, func, arg1, arg2, code)__inline_mathcodeNP2_(float_type,func,arg1,arg2,code) __MATH_INLINE float_type __NTH (func (float_type arg1, float_type arg2)) { code; }__inline_mathcode3_(float_type,func,arg1,arg2,arg3,code) __MATH_INLINE float_type func (float_type, float_type, float_type) __THROW; __inline_mathcodeNP3_(float_type, func, arg1, arg2, arg3, code)__inline_mathcodeNP3_(float_type,func,arg1,arg2,arg3,code) __MATH_INLINE float_type __NTH (func (float_type arg1, float_type arg2, float_type arg3)) { code; }__atan2_code)'*(+),*-+.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_str.debug_macinfo44#HH 1hh<7 ?DDGoԂTo@c ((l 000 u``pxxp{D 44PP    $ $$$xH"jH]$)0&4*]XxC\#V lW4HhDԂ(0 ` x  4 P  $ !"#kvvvkvEk   $@ p #0=KW mEmkm PP2   P ':@ T `  d. n` t?   \ PT $@ " 3 >9P4 Vyf` ~S $ ( T`v     .^ <8 H /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.celf-init.c_DYNAMIC_fp_hwprint_header__fini_array_end__dso_handle__libc_csu_finiputchar@@GLIBC_2.0gottfried_wilhelm_leibnizjohn_wallisbbpfactorial_initscanf@@GLIBC_2.0srinivasa_aiyangar_ramanujanprint_menu_start__strtol_internal@@GLIBC_2.0__fini_array_start__libc_csu_init__bss_startmain__libc_start_main@@GLIBC_2.0__init_array_enddata_startprintf@@GLIBC_2.0_finisqrt@@GLIBC_2.0johann_heinrich_lambertlambert_algo_edata__i686.get_pc_thunk.bx_GLOBAL_OFFSET_TABLE__end__init_array_start_IO_stdin_usedfrancois_vieterun_algo__data_start_Jv_RegisterClassesleonhard_eulerviete_formulaexponential__gmon_start__pi-calculator/src/bbp.h0000644000175000001440000000401310365646022015212 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-25 */ /* 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. */ void bbp(long double passes) { long double i, pi=0; for (i=0; i #include #include "mymath.h" #include "bbp.h" #include "leonhard_euler.h" #include "johann_heinrich_lambert.h" #include "gottfried_wilhelm_leibniz.h" #include "srinivasa_aiyangar_ramanujan.h" #include "francois_viete.h" #include "john_wallis.h" void run_algo(int decision_algo, long double decision_passes) { switch(decision_algo) { case 1 : bbp(decision_passes); break; case 2 : leonhard_euler(decision_passes); break; case 3 : johann_heinrich_lambert(decision_passes); break; case 4 : gottfried_wilhelm_leibniz(decision_passes); break; case 5 : srinivasa_aiyangar_ramanujan(decision_passes); break; case 6 : francois_viete(decision_passes); break; case 7 : john_wallis(decision_passes); break; default: printf("%s \n", "You should enter a number from above."); break; } } void print_header() { printf("\n %s \n", "PI - Calculator - (C) 2005,2006 Sebastian Wieseler [GPL]"); printf(" %s\n\n" , "========================================================"); } void print_menu() { 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) Viete formula"); printf("%s \n", " 7) Wallis formula"); printf("\n"); } int main(int argc, char* argv[]) { /* declare some variables */ int decision_algo; long double decision_passes; /* print the header */ print_header(); if (argc == 3) { decision_algo = atoi(argv[1]); /* string to integer */ decision_passes = atol(argv[2]);/* string to long */ } else { /* print the menu */ print_menu(); /* ask what algorithm to use */ printf(" %s" , "Which algorithm do you want to use for the calculation? "); scanf("%d" , &decision_algo); /* ask how many runs/passes we should do with our algorithm */ printf(" %s" , "How many iterations of the algorithm should be passed through? "); scanf("%Lf" , &decision_passes); } /* run the algorithm */ run_algo(decision_algo, decision_passes); /* print the bad truth - we are not perfect (yet) :( */ printf("%s %.62f \n", " The faithfull Pi is:", 3.141592653589793238462643383279502884197169399375); return 0; } pi-calculator/src/gottfried_wilhelm_leibniz.h0000644000175000001440000000364710365646033021711 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-25 */ /* CVS-Version: 1.2 */ /* ----------------------------------------------------- */ /* 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. */ void gottfried_wilhelm_leibniz(long double passes) { long double quarter_of_pi=0; int i; for (i=0; i void a(char* text) { printf("%s", text); } void hello(void (*f)(char*)) { (*f)("hello "); } void world(void (*f)(char*)) { (*f)("world "); } void newline(void (*f)(char*)) { (*f)("\n"); } int main() { hello(&a); world(&a); newline(&a); return 0; } pi-calculator/src/john_wallis.h0000644000175000001440000000350710365646045016774 0ustar sebastianusers/*********************************************************/ /* Wallis product to calculate Pi */ /* http://en.wikipedia.org/wiki/Wallis_product */ /* ----------------------------------------------------- */ /* Autor: Sebastian Wieseler */ /* Mail: programming@kickino.org */ /* Web: http://www.kickino.org/ */ /* IRC: #uscc @ irc.forkbomb.ch:6668 (ssl only) */ /* ----------------------------------------------------- */ /* Date: 2005-12-25 */ /* Last Change: 2006-01-25 */ /* CVS-Version: 1.2 */ /* ----------------------------------------------------- */ /* 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. */ void john_wallis(long double passes) { long double i, two_over_pi=1; for (i=1;i<=passes;i++) { two_over_pi *= (1 - 1./(4*i*i)) ; printf ("%6.0Lf: %.60Lf \n", i, 2./two_over_pi ); } } pi-calculator/src/johann_heinrich_lambert.h0000644000175000001440000000406210365646040021307 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-25 */ /* CVS-Version: 1.2 */ /* ----------------------------------------------------- */ /* 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. */ /* Pi = 4./(n+1); * i is passes -- counter; * i was 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; /* default is else tree */ return 1; } void johann_heinrich_lambert(long double passes) { long double i; for (i=1; i<=passes; i++) { printf ("%6.0Lf: %.62Lf \n", i, 4./(lambert_algo(1,i)+1) ); } } pi-calculator/src/leonhard_euler.h0000644000175000001440000000352510365646053017452 0ustar sebastianusers/*********************************************************/ /* Euler's algorithm to calculate Pi */ /* http://en.wikipedia.org/wiki/Riemann_zeta_function */ /* ----------------------------------------------------- */ /* 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-25 */ /* Last Change: 2006-01-25 */ /* CVS-Version: 1.2 */ /* ----------------------------------------------------- */ /* 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 void leonhard_euler(long double passes) { long double i, pi=0; for (i=1; i<=passes; i++) { pi += (1./(i*i)); printf ("%6.0Lf: %.60f \n", i, sqrt(6*pi) ); } } pi-calculator/src/francois_viete.h0000644000175000001440000000460210365646027017460 0ustar sebastianusers/*********************************************************/ /* Viete 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-25 */ /* CVS-Version: 1.2 */ /* ----------------------------------------------------- */ /* 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. */ /* 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_formula(long double n) { if (n==1) return sqrt(2); /* a[1]=sqrt(2) */ return sqrt( 2 + viete_formula(n-1) ); } void francois_viete(long double passes) { long double two_over_pi = sqrt(2)/2; long double i; for (i=2; i<=passes; i++) { two_over_pi *= viete_formula(i) / 2; printf ("%6.0Lf: %.62Lf \n", i, 2/two_over_pi ); } } pi-calculator/src/srinivasa_aiyangar_ramanujan.h0000644000175000001440000000417610365646066022377 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-25 */ /* CVS-Version: 1.2 */ /* ----------------------------------------------------- */ /* 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. */ void srinivasa_aiyangar_ramanujan(long double passes) { long double i, one_over_pi=0; for (i=0; i<=passes; i++) { one_over_pi += ( factorial(4*i) * (1103 + 26390*i ) ) / ( exponential(factorial(i), 4) * exponential(396, 4*i) ); /* the output: */ printf ("%6.0Lf: %.62Lf \n", i, 1./( ( 2*sqrt(2) * 1./ 9801 ) * one_over_pi )); /* the same: printf ("%6.0Lf : %.62Lf \n", i, * 1./( ( (sqrt(8) ) / 9801 ) * one_over_pi ) ); // is identical */ } } 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)