Exponential Values 
Author Message
 Exponential Values
Dividing 2.0/312659.0 gives me 6.3967454E-6

After this point i cannot do any arithmetical operations
with this number!(Exponential Value)

Is there a way to convert the value 6.3967454E-6 into
something like that :6.3967 ?

I know that i can convert 6.3967454E-6 into a varchar, cut
and throw away 'E-6' and then convert 6.3967454 into a
decimal again, but i really think that there is something
more prettier in SQl SERVER, there is gotta be....



Sat, 22 May 2004 05:27:42 GMT
 Exponential Values

The result is a very very small number, not 6.39 or anything like
that.  (Throwing away the E-6 at the end would be multiplying the
value by one million.)

What do you mean "you cannot do" anything with this number?  In
what context?  For example if you store it in a Transact-SQL
variable of type "float" you should be able to work with it.


Quote:
> Dividing 2.0/312659.0 gives me 6.3967454E-6

> After this point i cannot do any arithmetical operations
> with this number!(Exponential Value)

> Is there a way to convert the value 6.3967454E-6 into
> something like that :6.3967 ?

> I know that i can convert 6.3967454E-6 into a varchar, cut
> and throw away 'E-6' and then convert 6.3967454 into a
> decimal again, but i really think that there is something
> more prettier in SQl SERVER, there is gotta be....



Sat, 22 May 2004 05:55:54 GMT
 Exponential Values
What i really need to do is round that Exponential value.

round(6.3967454E-6,0) gives me zero, whatever i convert
this number into(float, decimal, etc), i need to get in
this case 6, if this value was 6.583455E-6 i should get 7.

All i need to do is implement Round() finction to this
exponential value, which i can't do....

Quote:
>-----Original Message-----
>The result is a very very small number, not 6.39 or
anything like
>that.  (Throwing away the E-6 at the end would be
multiplying the
>value by one million.)

>What do you mean "you cannot do" anything with this
number?  In
>what context?  For example if you store it in a Transact-
SQL
>variable of type "float" you should be able to work with
it.



>> Dividing 2.0/312659.0 gives me 6.3967454E-6

>> After this point i cannot do any arithmetical operations
>> with this number!(Exponential Value)

>> Is there a way to convert the value 6.3967454E-6 into
>> something like that :6.3967 ?

>> I know that i can convert 6.3967454E-6 into a varchar,
cut
>> and throw away 'E-6' and then convert 6.3967454 into a
>> decimal again, but i really think that there is
something
>> more prettier in SQl SERVER, there is gotta be....

>.



Sat, 22 May 2004 06:07:36 GMT
 Exponential Values
I don't mean to be crass, but do you understand exponentials?
6.3967454E-6 equates to .0000063967454

In what world would rounding .0000063967454 to 6 make any sense at all?
Either way, you could do what someone else suggested and multiply the number
by 1,000,000, and then round it to get 6.

Zach


Quote:
> What i really need to do is round that Exponential value.

> round(6.3967454E-6,0) gives me zero, whatever i convert
> this number into(float, decimal, etc), i need to get in
> this case 6, if this value was 6.583455E-6 i should get 7.

> All i need to do is implement Round() finction to this
> exponential value, which i can't do....

> >-----Original Message-----
> >The result is a very very small number, not 6.39 or
> anything like
> >that.  (Throwing away the E-6 at the end would be
> multiplying the
> >value by one million.)

> >What do you mean "you cannot do" anything with this
> number?  In
> >what context?  For example if you store it in a Transact-
> SQL
> >variable of type "float" you should be able to work with
> it.



> >> Dividing 2.0/312659.0 gives me 6.3967454E-6

> >> After this point i cannot do any arithmetical operations
> >> with this number!(Exponential Value)

> >> Is there a way to convert the value 6.3967454E-6 into
> >> something like that :6.3967 ?

> >> I know that i can convert 6.3967454E-6 into a varchar,
> cut
> >> and throw away 'E-6' and then convert 6.3967454 into a
> >> decimal again, but i really think that there is
> something
> >> more prettier in SQl SERVER, there is gotta be....

> >.



Sat, 22 May 2004 06:21:20 GMT
 Exponential Values

Quote:
> What i really need to do is round that Exponential value.

> round(6.3967454E-6,0) gives me zero,

That's because the number you're dealing with
is approximately 0.0000063967454. Round that to
zero decimal places and you get 0.

Maybe what you want is round(6.3967454E-6, 7)?

To get to 6.0 (which seems to be what you're asking
for), you would have to multiply by 10^6
(1 million), *then* round to zero decimal places.

Tim Heckman



Sat, 22 May 2004 06:24:22 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. Exponential Moving Average

2. How to suppress exponential notation?

3. SUM Getting Displayed In Exponential Form

4. Exponential Numbers

5. Exponential formula

6. Retreive data in exponential form

7. Need a field whose value references another value

8. select value then update value without intervening reads/updates

9. HELP: Getting parent table values who don't have corresponding child values

10. last value on time of accumulated values

11. use a value in a column to copy another value

12. How To make a REFERENCING to Old value or New Value in a Triggers


 
Powered by phpBB® Forum Software