Karim Belabas on Thu, 17 Nov 2022 23:29:33 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
- To: "Ruud H.G. van Tol" <rvtol@isolution.nl>
- Subject: Re: t_VECSMALL / GEN
- From: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
- Date: Thu, 17 Nov 2022 23:28:04 +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=1668724083; c=relaxed/relaxed; bh=Uio2QCzDwaJto2AfwEdgDDpEeBYgHW12dHa+Fcy9R1g=; h=DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; b=nxbyFFXuzMrwXCU0udzLsmP61rPSanhkOo29Z2t1iIDLDkGaT9BLurU6WumjPVUothYjcnHQxnrbx31QtqCnLJiRPaOMMk0gIUkkBw4lz9q1fnyINH1GBoxeYyb3Zmliitp0S+YfYOrssboboq4tfghUUYuIUlkknfFKjigNiJ5Pd+P/zsADJ+jY1axVbzrpzkFtT308Sa7eU5/AmB/SwZ3geOEBBa6XbhiorBMTAejcpauBZvF/P1qm/viYOW9PN0I2UIzIATiVypcSKeZFaecjH4P+OZdjivQLyzuLeL9mDV04mMPAM9ZOENJrRCRg+hwU6b5Eg6kbtw0MJu0Ndhh/mXhDtIOVnclHta9314TS+XvW/CPcY1WTAw/TLU+fSBV8jggoKiQ6Zoqi168yq7PVcSSEDWazPTzLN4QIs21v2QlLv9RZx6Crg75czik0Yq9Ak+zOVx/+6/co/JmK1yoewdkpfRjFBZDnDsymWGjZWijk00GA0OxKLPJQY981/PkzRxVYiw6xsvchq3RGoZno4YPrcju3mtwFJ7tihQXnQ35WSHrVAl6UUT9U+e1kIDzn+V+Mf6X4F05QjPrbShOsYW64j5QZaassGVWuhmgDsyNcy4WK7HwIoKMTSCZZERhJNMS2j1vjkHe9gb1/bFzN6KjBhJKo29CrVlouyYs=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1668724083; cv=none; b=afUgMOvvr63KHm+z0zZHbenCB9XayO5XxVxa4N7OHO8CCuYE7qdtQ+sHkqDHM6gGgWWhcC0dmiT0cfE+LQGUQ31aFmTUWdw5AL/h+0/ffUpC3ltTCG5oUaxsa7ZpKvlYjhOpe0cazG/t27dNgcGAxwRtmOQe+t9vHP7SLH7imiZO+fCP970almh5xh0sldFVWEsrfAYZCgDs81kFfV7FdO1SK7/0BjwYY3Xp4oiPUCiOwpx5eZQEDHCDJ15POMTZD8BDJSz6heYF8V0otMQ1Z7qJSKx8UIN4xcgqYH3o4DmQu+EdG7z2a+uP290fcseZRF4eo+MjV1oCD0BpqQDDUNGtsbKdR4oYtu7O2NKiPBHMu07RJPoOZaxCDThdyCEsLbbOUMjiHDd+kThyOlvrXrS2MIQ2YWlCnADjp5YBAQoIq1vlHySRIRpMSgoK2BWcjqJhxpBZDAwCoEXntWsQRKnoKbWciVO7ymYV7GsyPinYs7YKtjMceglB0DihTuoJ/gRs2MFhmSS5koiNHzHXr9oZBuOuwsuqnne2KrQ16bbv2uDi9HDNhTDnB9EGeDQaCmsUgWWZa524NJgNHbTJcdGjKvsW8EfO4PEJR7ds/5V3jqrt5ygqvKTk3X3aSP6MdcbVad/lCwPELoTaVqYAIh+GdtYmPGx3yjnyHGDtlac=
- Authentication-results: smail; arc=none
- Cc: pari-dev@pari.math.u-bordeaux.fr
- Delivery-date: Thu, 17 Nov 2022 23:29:34 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1668724083; bh=Uio2QCzDwaJto2AfwEdgDDpEeBYgHW12dHa+Fcy9R1g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=TL4oATHuD5cF6M5EukphgOBloPXJQ359y8fLdj5HxWRz1eVoCveCxHpzDRCh1vVcr +IuUorpWHCyv8pGcbGtJBAkAS5/M1KQw4dEa904dI0uV2o0IehH7cZk7qxfdaqO1gw yubazn5Y5GA0sORFvVaNrSoiMMq1Ree0YdI4vcPJxIXvzvgXkydCjxwJ3HTWDIWXu/ SwD0rB1ldCDW0NiLfetxv3SPpLq2IqWGhluoqZxgNaeQDi4CIJdoZOWYgyRHLXmxjw g/xVaWt6IkBvV0dl//u7XhJQCYo97RoNU3/Yws96eBQdMGjyJF8njY8SgYHYdft/t9 XV+zj+FxSNUOs2iAdQoeBoe1Ux5mOoq3wjau5JztW2UDoY+fE0KBNrMfxL7vcs7F7B QQezjMWtbuBc+2s6f7yKutfiHkTC6uNvT1yHVr5uQkrMF8Pv0spOdqM+3YMTAHyjjH 0vjZa6TQyxTzBI8EfUw8uVO+Kj0bX7s80QM0a99d57eIHO0AikenViENftB38o8gzn zIzkeegxfcyhuP1ctDTgZn1ogyBn+fPb7KxFC4QdfzHyjUrHYviWL4GE6BqSZeq6Ke 4p+nwipnXaA1c6gtT7vOK0g4pb2E0wmD9NDaFlmrwyLToDfk+OcbE/mmKK4S5RkrJd IjlPXN1/FMGSwMuAjlZYa2hI=
- In-reply-to: <516a16d6-307a-c7c1-6da7-eb1e65e232fe@isolution.nl>
- Mail-followup-to: "Ruud H.G. van Tol" <rvtol@isolution.nl>, pari-dev@pari.math.u-bordeaux.fr
- References: <516a16d6-307a-c7c1-6da7-eb1e65e232fe@isolution.nl>
* Ruud H.G. van Tol [2022-11-17 13:36]:
> Is this on purpose?
>
> ? forperm(digits(27,2),p,print(fromdigits(p,2)))
> *** at top-level: ...erm(digits(27,2),p,print(fromdigits(p,2)))
> *** ^-----------------
> *** fromdigits: incorrect type in fromdigits (t_VECSMALL).
> *** Break loop: type 'break' to go back to GP prompt
> break>
>
> No problem to cast it, but feels unnecessary :)
The function for this existed internally but with a different semantic
(and a bug), so it was actually slightly annoying to implement it.
I commited a patch to the 'master' branch that supports
fromdigits(t_VECSMALL, b)
also in the case when b < -1 or the vecsmall contains negative integers.
(The internal libpari function assumed b > 1 and handled vecsmall
components as unsigned integers.)
Thanks for your report !
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/
`