Mercurial > octave
comparison libinterp/corefcn/pr-output.cc @ 31009:a0c8c28c38cb
maint: Merge stable to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sun, 22 May 2022 19:36:01 +0200 |
parents | 4ef25c610433 4d74446020ad |
children | 96f751f8392c |
comparison
equal
deleted
inserted
replaced
31007:497de29f6946 | 31009:a0c8c28c38cb |
---|---|
3843 Fixed point format with 16 significant figures. | 3843 Fixed point format with 16 significant figures. |
3844 | 3844 |
3845 As with the @samp{short} format, Octave will switch to an exponential @samp{e} | 3845 As with the @samp{short} format, Octave will switch to an exponential @samp{e} |
3846 format if it is unable to format a matrix properly using the current format. | 3846 format if it is unable to format a matrix properly using the current format. |
3847 | 3847 |
3848 @item short e | 3848 @item shorte |
3849 @itemx long e | 3849 @itemx longe |
3850 Exponential format. The number to be represented is split between a mantissa | 3850 Exponential format. The number to be represented is split between a mantissa |
3851 and an exponent (power of 10). The mantissa has 5 significant digits in the | 3851 and an exponent (power of 10). The mantissa has 5 significant digits in the |
3852 short format. In the long format, double values are displayed with 16 | 3852 short format. In the long format, double values are displayed with 16 |
3853 significant digits and single values are displayed with 8. For example, | 3853 significant digits and single values are displayed with 8. For example, |
3854 with the @samp{short e} format, @code{pi} is displayed as @code{3.1416e+00}. | 3854 with the @samp{shorte} format, @code{pi} is displayed as @code{3.1416e+00}. |
3855 | 3855 Optionally, the trailing @samp{e} can be split into a second argument. |
3856 @item short g | 3856 |
3857 @itemx long g | 3857 @item shortg |
3858 @itemx longg | |
3858 Optimally choose between fixed point and exponential format based on the | 3859 Optimally choose between fixed point and exponential format based on the |
3859 magnitude of the number. For example, with the @samp{short g} format, | 3860 magnitude of the number. For example, with the @samp{shortg} format, |
3860 @code{pi .^ [2; 4; 8; 16; 32]} is displayed as | 3861 @code{pi .^ [2; 4; 8; 16; 32]} is displayed as |
3861 | 3862 |
3862 @example | 3863 @example |
3863 @group | 3864 @group |
3864 ans = | 3865 ans = |
3868 9488.5 | 3869 9488.5 |
3869 9.0032e+07 | 3870 9.0032e+07 |
3870 8.1058e+15 | 3871 8.1058e+15 |
3871 @end group | 3872 @end group |
3872 @end example | 3873 @end example |
3873 | 3874 Optionally, the trailing @samp{g} can be split into a second argument. |
3874 @item short eng | 3875 |
3875 @itemx long eng | 3876 @item shorteng |
3876 Identical to @samp{short e} or @samp{long e} but displays the value using an | 3877 @itemx longeng |
3878 Identical to @samp{shorte} or @samp{longe} but displays the value using an | |
3877 engineering format, where the exponent is divisible by 3. For example, with | 3879 engineering format, where the exponent is divisible by 3. For example, with |
3878 the @samp{short eng} format, @code{10 * pi} is displayed as @code{31.416e+00}. | 3880 the @samp{shorteng} format, @code{10 * pi} is displayed as @code{31.416e+00}. |
3881 Optionally, the trailing @samp{eng} can be split into a second argument. | |
3879 | 3882 |
3880 @item free | 3883 @item free |
3881 @itemx none | 3884 @itemx none |
3882 Print output in free format, without trying to line up columns of matrices on | 3885 Print output in free format, without trying to line up columns of matrices on |
3883 the decimal point. This is a raw format equivalent to the C++ code | 3886 the decimal point. This is a raw format equivalent to the C++ code |