summaryrefslogtreecommitdiffstats
path: root/25.bc
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2009-05-14 19:51:41 -0500
committerJesse Luehrs <doy@tozt.net>2009-05-14 19:51:41 -0500
commitc3ff98ee4aa79bcaa07c8a478e96539c2a512e73 (patch)
tree0b1a04ee7e5b05ec23dcfa274d4258f8acbcdf9d /25.bc
parent394121b98178246a0b1063e9104f8878cf2a17e5 (diff)
downloadprojecteuler-c3ff98ee4aa79bcaa07c8a478e96539c2a512e73.tar.gz
projecteuler-c3ff98ee4aa79bcaa07c8a478e96539c2a512e73.zip
rename files for better sorting
Diffstat (limited to '25.bc')
-rw-r--r--25.bc29
1 files changed, 0 insertions, 29 deletions
diff --git a/25.bc b/25.bc
deleted file mode 100644
index 143e6c3..0000000
--- a/25.bc
+++ /dev/null
@@ -1,29 +0,0 @@
-#!/usr/bin/bc
-
-scale = 20
-phi = (1 + sqrt(5)) / 2
-loglimit = 1000 - 1 + l(sqrt(5))/l(10)
-
-scale = 0
-n = 1
-min = -1
-max = -1
-while (1) {
- print n, " (", min, ", ", max, ")\n"
- scale = 20
- if (l(phi^n - (1 - phi)^n)/l(10) > loglimit) {
- max = n
- } else {
- min = n
- }
- scale = 0
- if (max - min == 1) {
- max
- halt
- }
- if (max == -1) {
- n *= 2
- } else {
- n = (max + min) / 2
- }
-}