| 
	Karim Belabas on Sun, 27 Nov 2022 15:11:33 +0100
	 | 
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
	
- To: pari-users@pari.math.u-bordeaux.fr
 
- Subject: Re: A071521(n)
 
- From: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
 
- Date: Sun, 27 Nov 2022 15:10:26 +0100
 
- Arc-authentication-results: i=1; smail; arc=none
 
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc;	t=1669558226; c=relaxed/relaxed;	bh=bzi/ixMEza69U6oZtt8kFItCbfz7CA/uR7S04fTidjI=;	h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To:	 References:MIME-Version:Content-Type:Content-Disposition:	 Content-Transfer-Encoding:In-Reply-To; b=yDweK0WkirVAmUuaotyk7weodPCJAVwfJN06dExBT67vA6s3QrAfqeNZo4Qo4UiO/UzO/OJb/MZOV8gfQjt87oMT+kdx6CcaaDMo4mGSLohs6+gCtgsKp1Yqds/M+zGAZZUsRvW9kFEpjhNXdC5GzxJnWFTtXaXekQwoFNz9EghUmXdq5vsDyikR+gsOvnbh0EOFS3/CE/pHwAK8oZNAOe/E/UtVqkfx2r46zK92buKij8gby5iCy0KFuVkrWO7Vhm8enV5f3r3Gtxo/iLmoFvR0LPrCR+2eYVNbaaPaSylAJc26KIlIpN++HrM1yx8Ufwtatq4dloN3caNO2H1QVeT0ExlSiJkvc8XyCzwTMIWPdz4DPuJdKkzS+Ic1OEYNPNyDTE+9lyVpedxGi8uHoosifkPR/xPkqSaAeo7V+xfmSx5spFDqcHnsFnoSkP+LSjo6AZNU7UPZBx5Ef7wImgHz+AKU7irjRFGiZIa3714wu6ilpBuKyyy6vcGSALyKE3EPxH5jRU9P9lxNdbYyz4tKOk7zMBQC1k/15YkKlG0IyypZiy76ZAcl4rieud3n2d1U3yBRHPS4Z8z1xrZOJkhLCSpcAxdl+nQVIzp7jum8P1XcLtkQMPIcINq9rTnbOvcxObTx5htVcm5mstGv+JBj7vvyeB2Aw5CNlDEKgAg=
 
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1669558226;	cv=none; b=AskNb/91rSJZAi7JuTLPTB7KAb9i8qqIBQxZ3utHGpuNIO2RmXPvY+DWx3JLzCyjvGVMm5m9RvjJ/WnpG3VfbCMQnb2eT0OH+X4wbFbwX6jU/vKAI9ci4hu0s9x6xARSWwKMwBPG7CW6+yyauecec11o3J2ivIOcikuRmzSgbTylWQ5NbA076M99y2RbRlWIP5Mu0U+GMV3nwvpN6C+ldy5MvDPUSLspTtsm5SpQjjx7O7qG1ctrj0tKoy/xPYAJ5qdEwJAXhNvwWepPpblo54wUq7WDeCnM7SKb4cX5STySSqd6KHU8Gis/GKNQkadwHlkxShJ9xWFcRxfUDEnNmophjq+2+TmnmjIUmf693YnEGIqfOwJk0QNkncjyCA+IMusqE+V2C0tfz0usQMdLbh4OOSaiCiT3eiymcIzrjvbsRkU/xv7wVGVEigJXWRk56b0QoeaGKXTjwGK8+s04G33qdFpWbPNtC7HC27UKQRCmkeMP1P4prdAXab+joUu2Wr2AFKCUQ7wVMetIvvhP8CHcP6hogu8yE2PpwyR6za0kwayHqtvNckvV+WBMjIT02nCbXLFMPrFiSm457ut5l+DeB17pTXZQzZLUMTnX6ilZz5EEAJL2eHrt7aXqpq9DjNaBvjugehamu+jtzOrPqVEmtTp8zNe/Fm4Mc9ecoUY=
 
- Authentication-results: smail; dmarc=none header.from=math.u-bordeaux.fr
 
- Authentication-results: smail; arc=none
 
- Delivery-date: Sun, 27 Nov 2022 15:11:33 +0100
 
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr;	s=2022; t=1669558226;	bh=bzi/ixMEza69U6oZtt8kFItCbfz7CA/uR7S04fTidjI=;	h=Date:From:To:Subject:References:In-Reply-To:From;	b=TSGoYVQ2hG13F6RV4pnPVcQfyw05mP1IgU2dcCfKyJvnX3PWTmMGBUDmsBU9P3zGs	 9PWSmew8ExPMCHK62QSrxTVVSfPuyoUeZozYUkUY7pg2/UBbY2YbCyyPDmmUxWkHW3	 O38pQm656yu66MpfGXVLPB42oVx7d4jvRvnnpEbD4utlBa+cG4GDjT1yUef6HS7kgd	 oL/eA0MKLsigqjU0iK9JKgVjyv6ruXP/7JKILHQR8RDJUv4lHJdHVw5rrehorDq5/s	 3letk8eBJ8V22FjJwO/WMD+LKIpIFBSNZsalUS4nN0gBViux+xKZSBvP5N66qdM8x0	 yxTWL5iDeX7jOqAL3fokFKCduiZRG8c4RoYgfnlE2jzdn5h3FoZK7W/FTREXBQKOmy	 z9m+Er97lNNcG/PGY1jIMgBnaw3NcGXEs5bdVfpfc+42HpV6rgylhmhl9ERedUDGps	 SdUUcjvp5+HsmyQ+S42rahj948xtUbEBIBjhnN1JmaAL5dMnGjnj0DTqLaQYJuthhI	 VaK7DrB8TyWf/h7OpvqWUdwlowzlvYnciOD2UBsb3C7WsDL6peNt3Vk2JbbYu5FYxy	 /a95WodYYBW/aob0pKEMUglnvwZClqDAymWHttba7Q1WZUmArM132hMsvyKGq30OBa	 Rne8EQir/71XrvqcCFmvhzD4=
 
- In-reply-to: <Y4NQjXcLO9/ljmO+@seventeen>
 
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
 
- References: <cb566377-20f1-1d17-4350-a314d47dba6e@isolution.nl> <8857ab0f-bb8b-b955-e87f-69361e246c74@isolution.nl> <5d29da71-27a8-982d-61c8-c00b63e303c2@tiscali.co.uk> <Y4M6GoDnD8k3OMZC@math.u-bordeaux.fr> <Y4NQjXcLO9/ljmO+@seventeen>
 
* Bill Allombert [2022-11-27 12:57]:
> On Sun, Nov 27, 2022 at 11:21:14AM +0100, Karim Belabas wrote:
> > Hi,
> > 
> >   I didn't check the definition of A071521 in OEIS but I guess the
> > problem is the unexpected (if one is used to C) semantic of the 'a op= b'
> > operator in PARI/GP, whose value is A = a op b (and not 'a' !). 
> 
> The following C program print 5 , not 1:
> 
> #include <stdio.h>
> int main(void)
> {
>   long a = 1, b;
>   b = a*=5;
>   printf("%ld\n",b);
>   return 0;
> }
> 
> (all PARI/GP versions also return 5).
Yes, sorry. You're right about C of course, but I'm sure there must be
languages out there where my above parenthetical comment applies :-)
When thinking about what could have caused the original coding mistake,
the semantics of PARI's a++ sprang to mind (which corresponds to prefix
++a in C; there's no unary PARI operator corresponding to C's a++), then
I wrote this confusing bit. Thanks for the correction !
Cheers,
    K.B.
--
Karim Belabas  /  U. Bordeaux,  vice-président en charge du Numérique
Institut de Mathématiques de Bordeaux UMR 5251 - (+33) 05 40 00 29 77
http://www.math.u-bordeaux.fr/~kbelabas/
`
- References:
- A071521(n)
- From: "Ruud H.G. van Tol" <rvtol@isolution.nl>
 
 
- Re: A071521(n)
- From: Michael Day <mike_liz.day@tiscali.co.uk>
 
 
- Re: A071521(n)
- From: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
 
 
- Re: A071521(n)
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>