Home > Archive > ASE Database forum > April 2005 > ASE12.5.2









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author ASE12.5.2
sam

2005-04-05, 8:06 pm

Hi,
one of our client reports
select convert(varbinary(8)
, convert(float,
'1.3906744441272696e-309'))

works fine in ASE 12.0.2 but giving an error in 12.5.2.

Any clues.....
Muralidharan

2005-04-05, 8:06 pm

Try like this (without quotes around the value):

1> select convert(varbinary(8)
,
convert(float,1.3906744441272696e-309))
2> go
------------------
0x000100002799e71b
(1 row affected)

1> select @@version
2> go
------------------------------------------------------------------------------
Adaptive Server Enterprise/12.5.1/EBF 11658
ESD#2/P/Sun_svr4/OS 5.8/ase1251/1838/64-bit/FBO/Fri Feb 20
12:35:43 2004

HTH

> Hi,
> one of our client reports
> select convert(varbinary(8)
, convert(float,
> '1.3906744441272696e-309'))
>
> works fine in ASE 12.0.2 but giving an error in 12.5.2.
>
> Any clues.....

sam

2005-04-06, 8:03 pm

Hi,
I get
The floating point value '1.3906744441272696e-309' is out of
the range of machine representation (8 bytes). when I try
without quotes.

Any help is greatly appreciated....


[color=darkred]
> Try like this (without quotes around the value):
>
> 1> select convert(varbinary(8)
,
> convert(float,1.3906744441272696e-309))
> 2> go
> ------------------
> 0x000100002799e71b
> (1 row affected)
>
> 1> select @@version
> 2> go
> ----------------------------------------------------------
> -------------------- Adaptive Server Enterprise/12.5.1/EBF
> 11658 ESD#2/P/Sun_svr4/OS 5.8/ase1251/1838/64-bit/FBO/Fri
> Feb 20 12:35:43 2004
>
> HTH
>
Bret Halford

2005-04-06, 8:03 pm

There were some domain-value checks added to ASE in 12.5.0.3 under CR
271561 to make sure that forbidden values such as Inf and Nan were not
inserted
into ASE (such values were previously sometimes allowed but sometimes
not,
which caused replication failures)
..
Your change in behavior may be due to that. Although this value isn't a

NaN or Inf, it is less than the DBL_MIN value of 2.2250738585072014E-308

defined in float.h on Solaris, which may be why it is being rejected.

Out of curiousity, why are you working with such very small numbers?

Cheers,
-bret





sam wrote:
[color=darkred]
> Hi,
> I get
> The floating point value '1.3906744441272696e-309' is out of
> the range of machine representation (8 bytes). when I try
> without quotes.
>
> Any help is greatly appreciated....
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com