Re: Currency and Number data type

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Mary Ann (anonymous_at_discussions.microsoft.com)
Date: 03/24/04


Date: Wed, 24 Mar 2004 03:47:43 -0800

I know I have only just replied to your very helpful
answer but having read it again I realise I still have a
couple of points I would like to sort out. I know you've
been very helpful so far but would really appreciate just
a little more!

You refer to Float data type - this has confused me
because from your earlier answer I understood that Single
and Double used the "floating decimal point". What is
Float - is it the same as the Decimal option when looking
at Number data type size?

You also say you have to use Double or Float if you want
more than 4 decimal places - could you not use Single too?

What is the full "heavy sequence"? Is it Byte, Integer,
Long Integer, Single, Double, Decimal?

In hope that you have time and patience to reply!

Mary Ann
>-----Original Message-----
>On Tue, 23 Mar 2004 04:32:39 -0800, "Mary Ann"
><anonymous@discussions.microsoft.com> wrote:
>
>>Thank you John. At last I understand these weird
results
>>a bit more.
>>
>>Does this mean that if I am working with "normal"
numbers
>>rather than numbers the size cosmologists need I would
be
>>better to use Currency data type and format it as say
>>Standard?
>
>It depends on what you need. If four decimal places are
enough, you
>can use Currency. If you need five or more, you've got
no choice -
>Double or Float.
>
>>If that is so, what do I do when I have created a
>>calculated field - I can't set a data type only a
>>format. Do calculated fields have data types and if so
>>what is it - is it floating decimal like Number?
>
>It depends on the calculation. Addition and
multiplication, I'm pretty
>sure, will use the "heaviest" datatype that goes into
the calculation;
>that is, an Integer plus a Float plus a Double will give
a Double
>result. However, division will always give a Double.
>
>What you can do is to wrap the expression in a type-
conversion
>function: e.g. CCur([a] / [b]) will divide a by b,
giving a Double
>result, but that will then be converted to Currency
datatype.
>
>
> John W. Vinson[MVP]
> Come for live chats every Tuesday and Thursday
>http://go.compuserve.com/msdevapps?loc=us&access=public
>.
>



Relevant Pages

  • Re: best practices.rounding
    ... currency data type. ... The OP wants two decimal places then why not use the DECIMAL data type, ... calculation using FLOAT values. ... INSERT INTO DropMe ...
    (microsoft.public.access.gettingstarted)
  • Re: % stuff not calcing correctly?
    ... Was the formatting or field size? ... Data Type of the field to Currency instead of Number. ... > I'm doing the calculation using macros. ...
    (microsoft.public.access.formscoding)
  • Re: OT: HP and US dollar
    ... > The Chinese peg the yaun to the dollar. ... The US gov't is urging China to float their currency but China probably ...
    (comp.os.vms)
  • Re: Comparission cause problem
    ... >>Due to higher precision i would recommend to use the datatype double ... floating points then we should take the prefrence for the double data type. ... as you suggested that double will be faster as compared with the float. ... when it comes to comparing floating point types for equality you ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Float based math class. Is it exist?
    ... > because the processor was doing a double calculation internally ... > Mr.Jon Skeet, ... > I can't image a situation that double is calculated faters than float. ... float precision math is 2x faster than double. ...
    (microsoft.public.dotnet.languages.csharp)