This behavior (swith to "e") is logical. For example, with format("v",10), which is the default, 123456789 cannot be displayed in "v" mode with 10 characters. Hence, the only solution is to switch to "e" mode:

--> format("v",10)

--> 123456789
 ans  =

   1.235D+08

Of course, you cannot use less than 7 characters (3 chars for the signed mantissa and the dot and 4 chars for the exponent):

--> format("v",8)

--> 123456789
 ans  =

   1.2D+08


--> format("v",7)

--> 123456789
 ans  =

   1.D+08


--> format("v",6)

--> 123456789
 ans  =

   1.D+08



Le 05/06/2019 à 23:46, stephane.motte...@utc.fr a écrit :
Scilab 6.0.1 does it as follows:
 --> format(4); u=123.456
  u  =
    1.0  D+02
The display of Scilab 5.5.2 does not respect the format length either,  because " 123." has length 5 (blank sign +123 + dot)
S.


Quoting Samuel Gougeon <sgoug...@free.fr <mailto:sgoug...@free.fr>>:

Le 05/06/2019 à 21:57, stephane.motte...@utc.fr a écrit :

As MacOSX, Linux is not affected, this will help to solve this bug:

Scilab 6.0.2 (Feb 14 2019, 10:11:47)

--> *OS_Version*

ans=

Linux 4.15.0-48-generic

--> *format(4); u=123.456*

u=

1.D+02

Are you in "v" format? This result looks like to be in "e" one, and anyway it does not comply with the required width.
On win7 with 5.5.2 we get in "v" format:
-->format(4); u=123.456
 u  =
   123.
=> it does not switch to "e" format.




_______________________________________________
users mailing list
users@lists.scilab.org
https://antispam.utc.fr/proxy/1/c3RlcGhhbmUubW90dGVsZXRAdXRjLmZy/lists.scilab.org/mailman/listinfo/users

--
Stéphane Mottelet
Ingénieur de recherche
EA 4297 Transformations Intégrées de la Matière Renouvelable
Département Génie des Procédés Industriels
Sorbonne Universités - Université de Technologie de Compiègne
CS 60319, 60203 Compiègne cedex
Tel : +33(0)344234688
http://www.utc.fr/~mottelet

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to