d0=: >:@(<.!.0)@^.    NB. no tolerance

   10 d0 999999999999
12

--- Zsbán Ambrus <[EMAIL PROTECTED]> wrote:

> Phrases 8C. has this verb:
> 
>    d0=: >:@<[EMAIL PROTECTED]  NB.  Length to represent y in base x
> 
> This verb is imprecise.  For example, the phrase
> 
>    10 d0 999999999999
> 
> returns 13, while the result should be 12, because that integer has 12
> decimal digits.
> (This is with j601/2006-09-04/09:20 on i686-linux, with the default
> tolerance being J's default, 5.6843418861e_14.)
> 
> This computation is needed for Phrases 8C. m4, which converts an
> integer to a list of decimal digits, and other similar computations.
> 
> Could you tell me what the best way to do this calculation correctly is?
> 
> Also, how does one report bugs in the Phrases?
> 
> Thanks in advance for any answers,
> 
> Ambrus



      
____________________________________________________________________________________
Be a better sports nut!  Let your teams follow you 
with Yahoo Mobile. Try it now.  
http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to