summaryrefslogtreecommitdiff
path: root/fib.awk
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--fib.awk2
1 files changed, 1 insertions, 1 deletions
diff --git a/fib.awk b/fib.awk
index 6107c4c..07e8bab 100644
--- a/fib.awk
+++ b/fib.awk
@@ -6,5 +6,5 @@
BEGIN {
n = ARGV[1]
printf(OFMT ORS,
- (1/sqrt(5))*((1.0 + sqrt(5))/2.0)^n - (1/sqrt(5))*((1.0 - sqrt(5))/2.0)^n)
+ (1.0/sqrt(5.0))*((1.0 + sqrt(5.0))/2.0)^n - (1.0/sqrt(5.0))*((1.0 - sqrt(5.0))/2.0)^n)
}