# Revision history [back]

### Inconsistent result between Sage and Magma

I have the following Magma code:

N2t := 625;
D := 84100;
tau:= Sqrt(-IntegerRing(N2t)!D);
tau


It basically creates a ring of integers modulo 625, evaluated it for the value of D with negation, and finally applies a square root calculation. Now, the result produced is 280. When, I convert the code to Sage such as this:

N2t = 625
D = 84100
Z = Integers(N2t)
tau = sqrt(-Z(D))
tau


I get a result of 30. Any ideas why this is the case?

### Inconsistent result between Sage and Magma

I have the following Magma code:

N2t := 625;
D := 84100;
tau:= Sqrt(-IntegerRing(N2t)!D);
tau


It basically creates a ring of integers modulo 625, evaluated it for the value of D with negation, and finally applies a square root calculation. Now, the result produced is 280. When, I convert the code to Sage such as this:

N2t = 625
D = 84100
Z = Integers(N2t)
tau = sqrt(-Z(D))
tau


I get a result of 30. Any ideas why this is the case?

### Inconsistent result between Sage and MagmaMagma for sqrt

I have the following Magma code:

N2t := 625;
D := 84100;
tau:= Sqrt(-IntegerRing(N2t)!D);
tau


It basically creates a ring of integers modulo 625, evaluated it for the value of D with negation, and finally applies a square root calculation. Now, the result produced is 280. When, I convert the code to Sage such as this:

N2t = 625
D = 84100
Z = Integers(N2t)
tau = sqrt(-Z(D))
tau


I get a result of 30. Any ideas why this is the case?