PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Srinivasan, Ravikumar" <ravikumar dot srinivasan at gs dot com>
Subject: RE: DBD::Sybase 1.07 install on Solaris 8 - failing t/exec.t test #11
Date: Nov 2 2005 8:15PM

I would think this is a sybase feature :-)

Floats tend to do this from time to time. 
Reason I tend use decimal instead.

-Ravi 

-----Original Message-----
From: owner-sybperl-l@peppler.org [mailto:owner-sybperl-l@peppler.org] On
Behalf Of Greg Earle
Sent: Wednesday, November 02, 2005 3:03 PM
To: sybperl-l@peppler.org
Subject: Re: DBD::Sybase 1.07 install on Solaris 8 - failing t/exec.t test
#11

On Nov 2, 2005, at 11:37 AM, Michael Peppler wrote:
> On Tue, 2005-11-01 at 18:38 -0800, Greg Earle wrote:
>
>> I thought at first perhaps my Sybase server/login/password/database
>> information was incorrect, but I don't think I would've gotten this
>> far if it hadn't been.
>>
>> That part of t/exec.t is
>>
>> [...]
>> $rc = $sth->execute(undef, 25, 3.2234, "jan 3 2001", 5.4);
>> ok(defined($rc), "exec dbitest 3");
>> my @out = $sth->func('syb_output_params');
>> ok($out[0] == 5.4, "out param 1");
>>
>> Neither my Perl nor my (non-existent) Sybase knowledge are good
>> enough to tell what's going on here.  Any ideas, Mike?
>
> It looks like the output parameter that should be 5.4 isn't quite that.
> I'm not sure what the reason might be, but you could edit the script 
> and
> print out the @out list, like this:
>
> print "@out\n";
>
> right after the $sth->func() call to see what you get.

Oh, duh.  Why didn't I think of that  :-)

Looks like an arithmetic error:

[...]
ok 10 - exec dbitest 3
5.40000000000000035527136788005009
not ok 11 - out param 1
#     Failed test (t/exec.t at line 89)
[...]

So it's looking for 5.4, and getting something really close to it  :-)

Where do I look now?  Something in the way I built Perl that's
returning these oddball long-precision results?  Or in Sybase?

Thanks,

	- Greg