English 中文(简体)
在地图册中,“如果一 = 0 mo,则只有一 = 0时才会奏效。
原标题:`if a = 0 mod p then` in Maple only works when a = 0.

I need it to show the message every time a = 0 (mod p). But it only does it when a is actually 0. For example, if I plug Legendre(11,11), I get "-1".

Legendre := proc (a, p) 
local L; if a = `mod`(0, p) then 
"Coose a different integer";
else if a = -1 then 
L := (-1)^((1/2)*p-1/2); 
else 
L := `mod`(a^((1/2)*p-1/2), p); 
end if; 
if L = 1 then 
L else L := -1; 
L end if end if;
end proc;
最佳回答

<代码>a = mo(0, p.>> 应为0 = mod (a, p.

问题回答

暂无回答




相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

pdo database abstraction

Can someone help me to see what is going wrong with this setup I build the @sql query in the function below like this. The extra quotes are setup in the conditions array. $sql .= " WHERE $...

I wish I could correlate an "inline view"

I have a Patient table: PatientId Admitted --------- --------------- 1 d/m/yy hh:mm:ss 2 d/m/yy hh:mm:ss 3 d/m/yy hh:mm:ss I have a PatientMeasurement table (0 to ...

Syntax help! Php and MYSQL

Original: $sql = "SELECT DATE(TimeAdded) AS Date, $column_name FROM Codes ORDER BY TimeAdded ASC"; Altered: $sql = "SELECT DATE("m", TimeAdded ) AS Date, ColumnName FROM TableName ORDER BY ...

Is this code Equivalent

I am not a fan of the following construction if (self = [super init]) { //do something with self assuming it has been created } Is the following equivalent? self = [super init]; if (self != ...

热门标签