1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
|
Engineering-format changes the way maxima outputs floating-point numbers
to the notation engineers are used to: @code{a*10^b} with @code{b} dividable by
three.
@menu
* Functions and Variables for engineering-format::
@end menu
@node Functions and Variables for engineering-format, , engineering-format-pkg, engineering-format-pkg
@section Functions and Variables for engineering-format
@c -----------------------------------------------------------------------------
@anchor{engineering_format_floats}
@defvr {Option variable} engineering_format_floats
Default value: @code{true}
This variable allows to temporarily switch off engineering-format.
@c ===beg===
@c load("engineering-format");
@c float(sin(10)/10000);
@c engineering_format_floats:false$
@c float(sin(10)/10000);
@c ===end===
@example
@group
(%i1) load("engineering-format");
(%o1) /home/gunter/src/maxima-code/share/contrib/engineering-for\
mat.lisp
@end group
@group
(%i2) float(sin(10)/10000);
(%o2) - 54.40211108893698e-6
@end group
(%i3) engineering_format_floats:false$
@group
(%i4) float(sin(10)/10000);
(%o4) - 5.440211108893698e-5
@end group
@end example
See also @mref{fpprintprec} and @mrefdot{float}
@opencatbox{Categories:}
@category{Display functions}
@category{Global flags}
@category{Share packages}
@closecatbox
@end defvr
@anchor{engineering_format_min}
@defvr {Option variable} engineering_format_min
Default value: @code{0.0}
The minimum absolute value that isn't automatically converted to the engineering format.
See also @mref{engineering_format_max} and @mrefdot{engineering_format_floats}
@c ===beg===
@c lst: float([.05,.5,5,500,5000,500000]);
@c load("engineering-format");
@c lst;
@c engineering_format_min:.1$
@c engineering_format_max:1000$
@c lst;
@c ===end===
@example
@group
(%i1) lst: float([.05,.5,5,500,5000,500000]);
(%o1) [0.05, 0.5, 5.0, 500.0, 5000.0, 500000.0]
@end group
@group
(%i2) load("engineering-format");
(%o2) /home/gunter/src/maxima-code/share/contrib/engineering-for\
mat.lisp
@end group
@group
(%i3) lst;
(%o3) [50.0e-3, 500.0e-3, 5.0e+0, 500.0e+0, 5.0e+3, 500.0e+3]
@end group
(%i4) engineering_format_min:.1$
(%i5) engineering_format_max:1000$
@group
(%i6) lst;
(%o6) [50.0e-3, 0.5, 5.0, 500.0, 5.0e+3, 500.0e+3]
@end group
@end example
@opencatbox{Categories:}
@category{Display functions}
@category{Global flags}
@category{Share packages}
@closecatbox
@end defvr
@anchor{engineering_format_max}
@defvr {Option variable} engineering_format_max
Default value: @code{0.0}
The maximum absolute value that isn't automatically converted to the engineering format.
See also @mref{engineering_format_min} and @mrefdot{engineering_format_floats}
@opencatbox{Categories:}
@category{Display functions}
@category{Global flags}
@category{Share packages}
@closecatbox
@end defvr
|