[Scilab-users] int(x) bug for x>2^62

classic Classic list List threaded Threaded
3 messages Options
Philippe Roux Philippe Roux
Reply | Threaded
Open this post in threaded view
|

[Scilab-users] int(x) bug for x>2^62

Hi,

I find a strange behavior in "int" with scilab-6.0.1 today :

--> 2^63
 ans  =

   9.2233720368548D+18

--> int(2^63) //  negative result !!!
 ans  =

  -9.2233720368548D+18


--> int(2^62)
 ans  =

   4.6116860184274D+18

--> 2^62
 ans  =

   4.6116860184274D+18



the problem doesn't appear with floor/ceil/round. I search on bugzilla
but found nothing related to int.

Best regards,

Philippe

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
mottelet mottelet
Reply | Threaded
Open this post in threaded view
|

Re: int(x) bug for x>2^62

Hello

This bug has been recently fixed, see http://bugzilla.scilab.org/show_bug.cgi?id=15629

S.

Le 22 août 2018 à 10:26, philippe <[hidden email]> a écrit :

Hi,

I find a strange behavior in "int" with scilab-6.0.1 today :

--> 2^63
ans  =

  9.2233720368548D+18

--> int(2^63) //  negative result !!!
ans  =

 -9.2233720368548D+18


--> int(2^62)
ans  =

  4.6116860184274D+18

--> 2^62
ans  =

  4.6116860184274D+18



the problem doesn't appear with floor/ceil/round. I search on bugzilla
but found nothing related to int.

Best regards,

Philippe

_______________________________________________
users mailing list
[hidden email]
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users
Samuel GOUGEON Samuel GOUGEON
Reply | Threaded
Open this post in threaded view
|

Re: int(x) bug for x>2^62

In reply to this post by Philippe Roux
Hello Philippe,
This bug is fixed in Scilab 6.0.2-:
https://build.scilab.org/view/Scilab%206.0/
Regards
Samuel

Le 22/08/2018 à 10:26, philippe a écrit :

> Hi,
>
> I find a strange behavior in "int" with scilab-6.0.1 today :
>
> --> 2^63
>   ans  =
>
>     9.2233720368548D+18
>
> --> int(2^63) //  negative result !!!
>   ans  =
>
>    -9.2233720368548D+18
>
>
> --> int(2^62)
>   ans  =
>
>     4.6116860184274D+18
>
> --> 2^62
>   ans  =
>
>     4.6116860184274D+18
>
>
>
> the problem doesn't appear with floor/ceil/round. I search on bugzilla
> but found nothing related to int.
>
> Best regards,
>
> Philippe
>
> _______________________________________________
> users mailing list
> [hidden email]
> http://lists.scilab.org/mailman/listinfo/users
>

_______________________________________________
users mailing list
[hidden email]
http://lists.scilab.org/mailman/listinfo/users