%: 1r10 0.316228 %: 1r100 1r10 If the result can be expressed as a rational then it will be rational. The opening paragraph of section II.G of the dictionary is relevant.
On Thu, Mar 15, 2018 at 1:23 PM, Vijay Lulla <[email protected]> wrote: > Consider the following from my session: > > a=: 1r100 > b=: 1r10 > %: a > 1r10 > %: b > 0.316228 > datatype %: a > rational > datatype %: b > floating > > Is there any way to know in advance if the verb will change the datatype? > Since I am already using rational number shouldn't the verb return rational > number? I.e., isn't rational datatype especially for exact > representations? If so, why didn't %: b return a rational type? > > Any help, or pointers to relevant documentation, is highly appreciated. > Cordially, > Vijay. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
