An interval is a 2-element list x of numbers 
where <:/x and:

...
ivdivide=: (<./,>./) @ , @ (%/ ([ [EMAIL PROTECTED]@contain0)) " 1
contain0=: ({.<:0:) *. (0:<:{:)



----- Original Message -----
From: Roger Hui <[EMAIL PROTECTED]>
Date: Tuesday, February 27, 2007 7:54 am
Subject: Re: [Jprogramming] Precision, accuracy, and certainty [Was: Lack of 
precision ?]

> Neville Holmes writes:
> 
> > ...
> > Nevertheless, it would be good if the J
> > interpreter would eventually support modern 
> > interval arithmetic.  This would certainly be 
> > appreciated in many mathematical circles in 
> > Europe.
> 
> To that end, it would be useful to first provide a 
> J model interval arithmetic.  For example:
> 
> An interval is a 2-element list of numbers and:
> 
> ivplus  =: +"1
> ivminus =: -"1
> ivtimes =: (<./,>./) @ , @ (*/) " 1
> ivdivide=: (<./,>./) @ , @ (%/ assert@(0~:])) " 1
> assert  =: 13!:8 @ ($&12) @ (0 e. ,)
> 
> etc.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to