Alex, if you use the layout of floating point representation 
to store multiple discreet quantities, you should realize, 
it is bad. And you probably already know the reasons,
but you are still doing it. The reason could be that 
somebody already designed it in an external system.
But you should be able to isolate from someone else's 
bad decisions by converting to your internal correct 
representation and doing the calculations in it.
In the case of timestamp/quantity, a list of floats
can be made into a table of two columns, both being
integer. And you still can use the same operations that
work on vector to work on table, both being list of items.
Doing this will confine the floating point issues to
the conversion stage, leaving your calculations worry-free.
It would be easier then to discover the issues with the
external representation and make arguments to change it.

--- On Fri, 5/2/08, Alex Rufon <[EMAIL PROTECTED]> wrote:

> Nope. I really need the fractional part. I'm looking
> into how big the
> impact will be if I remove the millennium part but I really
> need the
> fractional part to show up. For now, I'm using the
> intolerant unique as
> described in the intolerant index of by Henry Rich in the J
> for C
> programmers books.
>    unique=: ~.!.0
>    unique 20080516 20080516 20080516.00000057
> 20080516 20080516.0000006
>    
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> R.E. Boss
> Sent: Wednesday, April 30, 2008 5:58 PM
> To: 'Programming forum'
> Subject: RE: [Jprogramming] RE: [Jgeneral] NUB Problem
> 
> Or
> 
>    ~.&.(-&20000000) 20080516 20080516.00000057
> 20080516 20080516
> 
> 
> R.E. Boss
> 
> 
> > -----Oorspronkelijk bericht-----
> > Van: [EMAIL PROTECTED]
> [mailto:programming-
> > [EMAIL PROTECTED] Namens Alex Rufon
> > Verzonden: woensdag 30 april 2008 8:33
> > Aan: Programming forum
> > Onderwerp: RE: [Jprogramming] RE: [Jgeneral] NUB
> Problem
> > 
> > Oh.
> > 
> > Yep, removing the millennium would work and I'll
> just add it later. :)
> > 
> > Thanks.
> > 
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf
> Of Chris Burke
> > Sent: Wednesday, April 30, 2008 1:37 PM
> > To: Programming forum
> > Subject: Re: [Jprogramming] RE: [Jgeneral] NUB Problem
> > 
> > Alex Rufon wrote:
> > > Unfortunately, the use of the 200801010000 as
> 01/01/2008 00:00 is
> > > tightly embedded into our system that yanking it
> out is no mean
> feat.
> > :(
> > 
> > OK, but this is not the same thing. The number you
> used was
> > 20080516.00000057 . Where does the 57 come from?
> > 
> > Even if you cannot control the inputs, you should be
> able to fix up
> what
> > you are given so that things work properly in J.
> > 
> > For example:
> > 
> >   ff=: ":!.15
> > 
> > NB. this is your problem:
> >   ff ~. 20080516 20080516.00000057
> > 20080516
> > 
> > NB. this is a simple fix that removes the millenium -
> > NB. you can always add it back later:
> >   ff ~. 20080516 20080516.00000057 - 20000000
> > 80516 80516.00000057
> > 
> >
> ----------------------------------------------------------------------
> > For information about J forums see
> http://www.jsoftware.com/forums.htm
> >
> ----------------------------------------------------------------------
> > For information about J forums see
> http://www.jsoftware.com/forums.htm
> 
> ----------------------------------------------------------------------
> For information about J forums see
> http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see
> http://www.jsoftware.com/forums.htm


      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to