Karim Belabas on Tue, 06 Jun 2023 20:27:45 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Different behavior in library mode (PARI) vs. in GP (when using Z_issmooth)
|
- To: Daniel Berger <Daniel.Berger@hs-rm.de>
- Subject: Re: Different behavior in library mode (PARI) vs. in GP (when using Z_issmooth)
- From: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
- Date: Tue, 6 Jun 2023 20:23:04 +0200
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1686075775; c=relaxed/relaxed; bh=8RissTZFg8vQVvnjbkevNp+nJYotdlHgtcZRLKj1yxg=; 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=umcls0mOaUPsbEJFv9hGeqqvpuWqAQJZgT1+XeZcPC/WsliRnAISxMy2TrGDVqwzBShNB+of31gR7IVtguNCIqgT6+HBjC/9q80M2WE97mQ22sPvU5LOr/WmCZJg5beT2xb/2uf7tVMb4XcdNL2BTw4zzIHFHaBZymSQGq/6j36btKdBJmhRCHaXg9d/vKprdOVo3SM6AntCy9lleKZ2c8rif/szX5qI3xFDJjutk27Ujd9ofPM6x3FHE2KuVRkS+/ceIh0B6NbQb2SD+tg7NUshsp2tm4+ey/lecQs6NmdCdoaV+7153ycfvGG166QN91bvZiKdSz1upg3JcM3ibOKKMtNKzQ63XRLhzK+d2P2mJHNLnwWLJ+sHaS8J2WNZKmlqclMZRDLjV6dpZbUhSmY72H7V76r4VkwkjIXNbEQ1zH3EtuEb28ZY0VSSKblW4CNQoK8JhHulktpql0m9Svj6c/yq66c4DQtj6HhVEwSC1reoZG60vZ9QmxTNrI4Q0jdDis/3AqDgX0bTy2S5wOqJknSdpBOGWW8GJWT/Y+q/Qywf5dOa9o2iuzQ2wYCEqFTU5pL5f2orYNK6ISXQkiRfx+QyYRlRVsElq9yH8UBn1DSnt92797Nl991sjwIcxkkTc2FxMwth/e1Gj6y629ox5kRZsX/ukHVMg0tX/No=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1686075775; cv=none; b=yzjpSkuWQF2V1JdQGmOvLawf/Bir8260vAGOMD42HAN5uNzWRx/KyDCWfzfJtAyJSXTzotGytgsRhV4iQc2uXXrngwx1UTMYXPkU3r0Jhf8U9PUzut8QvXcvLRNXr6EHh7EL0wxTjHiSfXbhCXhrAIysB6CvvvP0Q1FLGEHf61jPsUCC5/PRTmkFEju/NBABg4+ZGd6K7SmneCAgIg8ByyrcIQbs9GnT+59ASpNzMG3R5Z5EuY7/MNvJwoP575FtrEtzbcmb2aLviQZuy+bS5w2RyPWlo+TOpiY2Xl8uDrt+LH2/A+Lruvx34f3mmIwrVE0c6lCf1stEPgQ811MD4NWl3n4lyW+0t2gS8Q5MNL3W7hA72MqiIWWyljcyKO2NXOhH7hZ8ki5yG+r2/quZ/TYT4SZYcRt9NaruhFMFFw2/uCFozx6MTHX8xiSZ7ZphEcB+C5fedehGvO8IVGgMB/4V8TY9y3T7+dSpq8ST4l5EimMKbFfvG9/HwahSaHuJ1ayPCNaNgQkwelOXcsOuNMEsYgiPbcFATWYsDxdAWAM/76TMhtEwLRd8ZITDBnopJoMtOb5DggIpjJ3Cacn3Rb5TYZg0zKHmacrJi8KfKRnouLKvmkRHGLcR9HwsYNw2/3l6EtRmwJ7ZN46Sa8c9vNSCBxoaQddiiMQ9mxIwNaQ=
- Authentication-results: smail; dmarc=none header.from=math.u-bordeaux.fr
- Authentication-results: smail; arc=none
- Cc: pari-users@pari.math.u-bordeaux.fr
- Delivery-date: Tue, 06 Jun 2023 20:27:45 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1686075775; bh=8RissTZFg8vQVvnjbkevNp+nJYotdlHgtcZRLKj1yxg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fVVvGipw655AdHk4F+27yrF+RxcVuKSMPEbnaxK3TgtRpozMRIKfrSM1xOmgBvbjS ZmoclkZaaQ/OO73hbKSgZoBVCDTbJ5Xln7TCQV8ocou+r6Itw24gCGF6UWAToWzI68 aIAyWtCx3MC3YDk/6uPjIiOoxcnUuEcbzyRH/T40HxLCIQwcH6Sbb4DCbgBXY/fCKc 99tfQPclV0U+2Ij9aiEnr2TaLrL2zqfx/lDWssCBF7ot3wfBGBk9sJBv/+Z/3kMrsu aXwn7MS4WWPkGIy0JAJftUG9o13PuKNRADRdMu9XV0gNJAc3dR444pMGOL/7gcJW7r OgcRn7vYnUA2p+aJeuPSKOydBMgNOmqxGHI/m+Ahuv6AkHuvSqIoJ8QelZEOG6T2pG VCMnxem1iESPtbCKqHRscczohXpyR54IRWeFHJtMdNSm5tBL9ZfK7jWqBMAmWiAcZ1 Q4SiQVCEF7eJnXH/VPP3UUq3nqonV6J5763U68LMM5C2GniQNQf9xdV90rwm6Y10wA xVdfG0oC5vK385QkG8/SkUlYCje1ziVGbU9uhu3wmEY7BIhWobMItuClMvfiUcrkOF VepzJoxseq2MxfDykwHNJsQx9yMbVo+6XeiuYT7mUc+PrCSFILLUbWaOzzWEOWUMlv kUyGReleiR3HJ3CkP6ddb7YM=
- In-reply-to: <1c6bf1e7-736d-8c24-451f-9bacc0a1fc39@hs-rm.de>
- Mail-followup-to: Daniel Berger <Daniel.Berger@hs-rm.de>, pari-users@pari.math.u-bordeaux.fr
- References: <1c6bf1e7-736d-8c24-451f-9bacc0a1fc39@hs-rm.de>
* Daniel Berger [2023-06-06 19:52]:
[...]
> If I however compile this as part of a shared library and install it for use
> in gp, it doesn't. It appears to me that `Z_issmooth` always returns 1, for
> example `function(10, 2, 3)` now returns `[1, 8, 49, 288]`. I tried testing
> `Z_issmooth` separately in gp by installing it with
> `install(Z_issmooth,"GU",smoothtest,"libpari.so")` and for example
> `smoothtest(408,10)` (should return 0) but it breaks with a segmentation
> fault.
[...]
Z_issmooth return a long integer, so the correct prototype code is lGU
instead of GU (default type 'GEN' for the return value):
install(Z_issmooth,"lGU",smoothtest,"libpari.so")
Cheers,
K.B.
--
Pr. 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/