Re: why is this happening?
American Citizen <[email protected]> Sat, 2 May 2026 18:53:15 -0700
| Newsgroups | gmane.comp.mathematics.pari.user |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------MRsFXJ3lYjyJhH0aouQ8iaxQ
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Silly me
I thought that subtracting the 2 elliptic curves would result in a
vector of zeroes.
I believe that we are left with the one option to test if 2 elliptic
curves are the same
? e1 = e2.
And trust that GP pari can get this right.
On 5/1/26 22:43, Loïc Grenié wrote:
> On Sat 2 May, 2026, at 02:31, American Citizen wrote:
>
> ? Vecsmall([1]) - Vecsmall([1])
> *** at top-level: Vecsmall([1])-Vecsmall([1])
> *** ^--------------
> *** _-_: forbidden addition t_VECSMALL + t_VECSMALL.
> *** Break loop: type 'break' to go back to GP prompt
> break>
>
> Can anyone explain why this won't work?
>
> Can't we subtract any element in GP Pari from itself and get 0 or
> null ?
>
>
> You cannot add/subtract two vecsmalls, because the sum/difference of
> two (short) integers of 64 bits (32 on 32 bit platforms) can easily
> overrun
> 64 bits. If you just want to know whether the 2 vecsmalls are equal, you
> can use ==.
>
> Hope this helps,
>
> Loïc
--------------MRsFXJ3lYjyJhH0aouQ8iaxQ
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Silly me</p>
<p>I thought that subtracting the 2 elliptic curves would result in
a vector of zeroes.</p>
<p>I believe that we are left with the one option to test if 2
elliptic curves are the same</p>
<p>? e1 = e2.</p>
<p>And trust that GP pari can get this right.</p>
<p><br>
</p>
<div class="moz-cite-prefix">On 5/1/26 22:43, Loïc Grenié wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAMLkfFTTxAXJtp9AoBMd2Fuhazenay6AQ2GUS1zqheZOqHFQyw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">
<div class="gmail_default"
style="font-family:verdana,sans-serif">On Sat 2 May, 2026,
at 02:31, American Citizen wrote:</div>
</div>
<div class="gmail_quote gmail_quote_container">
<blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">?
Vecsmall([1]) - Vecsmall([1])<br>
*** at top-level: Vecsmall([1])-Vecsmall([1])<br>
*** ^--------------<br>
*** _-_: forbidden addition t_VECSMALL + t_VECSMALL.<br>
*** Break loop: type 'break' to go back to GP prompt<br>
break><br>
<br>
Can anyone explain why this won't work?<br>
<br>
Can't we subtract any element in GP Pari from itself and get
0 or null ?</blockquote>
<div><br>
</div>
<div style="font-family:verdana,sans-serif"
class="gmail_default"> You cannot add/subtract two
vecsmalls, because the sum/difference of</div>
<div style="font-family:verdana,sans-serif"
class="gmail_default"> two (short) integers of 64 bits (32
on 32 bit platforms) can easily overrun</div>
<div style="font-family:verdana,sans-serif"
class="gmail_default"> 64 bits. If you just want to know
whether the 2 vecsmalls are equal, you</div>
<div style="font-family:verdana,sans-serif"
class="gmail_default"> can use ==.</div>
<div style="font-family:verdana,sans-serif"
class="gmail_default"><br>
</div>
<div style="font-family:verdana,sans-serif"
class="gmail_default"> Hope this helps,</div>
<div style="font-family:verdana,sans-serif"
class="gmail_default"><br>
</div>
<div style="font-family:verdana,sans-serif"
class="gmail_default"> Loïc</div>
</div>
</div>
</blockquote>
</body>
</html>
--------------MRsFXJ3lYjyJhH0aouQ8iaxQ--