# Revision history [back]

### mod 1 arithmetic

Hi all,

is it possible, to do simple mod 1 evaluations? For example, Mathematica outputs

N[1/2*(1 + Sqrt[5])^100 mod 1] ~ 0.9999999999999999999987374...

n(Mod(1/2(1 + Sqrt[5])^100,1)) (or similar attempts) in sage result in "unable to convert x (=1/2sqrt(5) + 1/2) to an integer"

Cheers, Markus

 2 code formatting slelievre 17654 ●22 ●160 ●348 http://carva.org/samue...

### mod 1 arithmetic

Hi all,

is it possible, to do simple mod 1 evaluations? For example, Mathematica outputs

N[1/2*(1 + Sqrt[5])^100 mod 1] ~ 0.9999999999999999999987374...0.9999999999999999999987374...


but

n(Mod(1/2*(1 + sqrt(5))^100,1))


n(Mod(1/2(1 + Sqrt[5])^100,1)) (or similar attempts) in sage Sage result in "unable in

TypeError: unable to convert x (=1/2sqrt(5) (=1/2*(sqrt(5) + 1/2) 1)^100) to an integer"integer


Cheers, Markus

 3 retagged FrédéricC 5151 ●3 ●43 ●112

### mod 1 arithmetic

Hi all,

is it possible, to do simple mod 1 evaluations? For example, Mathematica outputs

N[1/2*(1 + Sqrt[5])^100 mod 1] ~ 0.9999999999999999999987374...


but

n(Mod(1/2*(1 + sqrt(5))^100,1))


(or similar attempts) in Sage result in

TypeError: unable to convert x (=1/2*(sqrt(5) + 1)^100) to an integer


Cheers, Markus