Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!news.mathworks.com!zombie.ncsc.mil!gmi!msunews!harbinger.cc.monash.edu.au!news.cs.su.oz.au!tmx!news.tmx.com.au!news
From: Enrico Soldani
Subject: Re: Floats, Doubles, Math
Message-ID: <D5x0q8.890@online.tmx.com.au>
Nntp-Posting-Host: clemnet.tmx.com.au
Sender: news@online.tmx.com.au (System Administrator)
Organization: The Message eXchange Pty Ltd
Date: Thu, 23 Mar 1995 22:49:20 GMT
References: <parkerfj.17.00081ADD@sce.com>
X-Newsreader: AIR News 3.X (SPRY, Inc.)
Lines: 23

>   parkerfj@sce.com (Fred Parker) writes:
>                                                                                  
>   Problem:                                                                       
>                                                                                  
>       This amount is a float type in VisualWork's workspace when you do an       
>       inspect. As soon as you print this number in the workspace, it displayed   
>       847749.125.  This number has changed.  Even if you don't do a printString 
>       the number still change to 847749.125 as you insert it to Sybase via       
>       VisualWorks.                                                                
>                                                                                  
>   Questions:                                                                     
>                                                                                  
>       Does anyone have a solution as to how I can save the original number to    
>       Sybase via VisualWork without its content being changed by VisualWork?     
>                                                                                  
>       Also, how do you perform your calculation accurately if this happens?      
>       I tried to convert it to double, but that still doesn't help.              

You do not mention which version of VisualWorks you are using but under
version 2.0 there is a FixedPoint class that will probably satisfy your requirements.

Enrico

