Jan,

You should be able to format it yourself with a little playing around.

If you use the R:BASE function log10( .vdouble ), and take the Integer
portion of that you will know where the significant digits start, decimal
places left and right.

For example int(log10(.000003655)) is -5
But int(log10(3655.000) is +3

It seems to me that you can figure out how many powers of 10 to multiply
your value by to get the two significant digits to the left of the decimal
point, then take the integer of that.  Then divide by 10 and use your log10
value plus another one (for having divided by 10) in your scientific
notation.

But sorry, I don't have time to fiddle and turn this into a stored
procedure/function.

Bill



On Thu, Nov 6, 2014 at 1:36 PM, jan johansen <[email protected]>
wrote:

> This is so easy in excel.
> You just select scientific and the number of digits.
>
> Am I overlooking something?
>
>
>
>
>
> -----Original Message-----
> From: "jan johansen" <[email protected]>
> To: [email protected] (RBASE-L Mailing List)
> Date: Thu, 06 Nov 2014 09:56:57 -0800
> Subject: [RBASE-L] - Re: report display problem
>
> Albert,
>
> I run into the same problem in that I can't seem to force scientific
> notation.
>
> Jan
>
>
>
>
> -----Original Message-----
> From: Albert Berry <[email protected]>
> To: [email protected] (RBASE-L Mailing List)
> Date: Thu, 06 Nov 2014 10:32:13 -0700
> Subject: [RBASE-L] - Re: report display problem
>
> Lookup BIGNUM - you can specify the bignum number to have only two digits,
> the way I read it.
> Albert
>
> On 11/6/2014 10:21 AM, jan johansen wrote:
>
> Maybe. But the displayed value can have no more than 2 significant figures.
>
>
> -----Original Message-----
> From: Albert Berry <[email protected]> <[email protected]>
> To: [email protected] (RBASE-L Mailing List)
> Date: Thu, 06 Nov 2014 10:19:39 -0700
> Subject: [RBASE-L] - Re: report display problem
>
> Would BIGNUM work (assumes you are in 9.5 (64) ). For the report create a
> BIGNUM variable just for the display.
>
> Albert
>
> On 11/6/2014 9:51 AM, jan johansen wrote:
>
>
>  Hey all,
>
> I have a formatting problem that I don’t believe that I can use formatting
> for.
>
> The requirement is that the displayed number (in a report) can have no
> more than 2 significant figures displayed.
>
> Non-zero digits are always significant. Thus, 22 has two significant
> digits, and 22.3 has three significant digits.
> With zeroes, the situation is more complicated:
>
>    1. Zeroes placed before other digits are not significant; 0.046 has
>    two significant digits.
>    2. Zeroes placed between other digits are always significant; 4009 kg
>    has four significant digits.
>    3. Zeroes placed after other digits but behind a decimal point are
>    significant; 7.90 has three significant digits.
>    4. Zeroes at the end of a number are significant only if they are
>    behind a decimal point as in (c). Otherwise, it is impossible to tell if
>    they are significant. For example, in the number 8200, it is not clear if
>    the zeroes are significant or not. The number of significant digits in 8200
>    is at least two, but could be three or four. To avoid uncertainty, use
>    scientific notation to place significant zeroes behind a decimal point:
>
> 8.200 ´ 103 has four significant digits
> 8.20 ´ 103 has three significant digits
> 8.2 ´ 103 has two significant digits
>
> So I believe that the best thing for me to do is to use scientific
> notation.
>
> The column definition I have been using in the report is a Double. I
> cannot change the type but I know that this is a display issue.
>
> However, my attempts to “force” scientific notation have not worked.
>
> Any advice appreciated.
>
> Jan
>
>

Reply via email to