How print 208 585 224 782
As 208.5E9
need E9 (gigapaskal)
This
print using "Modul_U= ###.# ^"; Modul_U
printing parasite "%" befor
print using questions
-
- Posts: 35
- Joined: Nov 14, 2019 17:04
Re: print using questions
try
print using "####.#^^^^";208585224782
print using "####.#^^^^";208585224782
Re: print using questions
The exponent-part consists of from three to five ^ that must immediately follow the decimal-part:
^^^ for the exponent part on one digit (after the sign): E+/-#
^^^^ for the exponent part on two digits (after the sign): E+/-##
^^^^^ for the exponent part on three digits (after the sign): E+/-###
I can update the documentation.
[edit]
DONE:
KeyPgPrintusing → fxm [updated syntax for exponential notation]
^^^ for the exponent part on one digit (after the sign): E+/-#
^^^^ for the exponent part on two digits (after the sign): E+/-##
^^^^^ for the exponent part on three digits (after the sign): E+/-###
I can update the documentation.
[edit]
DONE:
KeyPgPrintusing → fxm [updated syntax for exponential notation]
Last edited by fxm on Jul 02, 2020 18:13, edited 2 times in total.
Re: print using questions
12val12newakk wrote:How print 208 585 224 782
As 208.5E9
need E9 (gigapaskal)
This
print using "Modul_U= ###.# ^"; Modul_U
printing parasite "%" befor
Code: Select all
#include "string.bi"
function formatE9(byval number as double) as string
number /= 1e9
return format(number, "0.0") & "E9"
end function
dim as double number = 208585224782
print formatE9(number / 100)
print formatE9(number / 10)
print formatE9(number) & " <--"
print formatE9(number * 10)
print formatE9(number * 100)