euler 1.0.4 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data.tar.gz.sig +1 -1
- data/History.txt +4 -0
- data/lib/euler.rb +2 -1
- metadata +2 -2
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v�����Y=��՛�A��d�E�9�f="�̶���ӓVg�Lz�Y�_����&ɔ�u���0�o��ì@��n�ߛ(W[z�D��D;��|�,��q�����Ҵ-���%�Z�Ő�ZĭEC�tL6��8��C�HJ��+�n�3Z�Uw�[����t��Z�^n!:E&�j7ֹV��-y��d� �eԃ�X��[3��.�2
d���v�[�G�~�^����mu��|��5_?gER\�s�&�x1%�j�2
|
data/History.txt
CHANGED
data/lib/euler.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The module that contains all the methods.
|
2
2
|
module Euler
|
3
|
-
VERSION = "1.0.
|
3
|
+
VERSION = "1.0.5"
|
4
4
|
extend self
|
5
5
|
attr_reader :primes, :sieve, :fibonaccis
|
6
6
|
# Several methods for the Integer class.
|
@@ -94,6 +94,7 @@ module Euler
|
|
94
94
|
# 1.is_fibonacci? # => true
|
95
95
|
# 4.is_fibonacci? # => true
|
96
96
|
def is_fibonacci?
|
97
|
+
return true if self == 1
|
97
98
|
a, b = Math.sqrt((5*(self**2))+4), Math.sqrt((5*(self**2))-4)
|
98
99
|
return true if (a.to_i == a and b.to_i != b) or (a.to_i != a && b.to_i == b)
|
99
100
|
return false
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: euler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Skalnik
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
jjVX87g40jCN9NIGt+c=
|
31
31
|
-----END CERTIFICATE-----
|
32
32
|
|
33
|
-
date: 2008-10-
|
33
|
+
date: 2008-10-12 00:00:00 -04:00
|
34
34
|
default_executable:
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
metadata.gz.sig
CHANGED
Binary file
|