some code to count partitions

PartsN =: ((- $: ]) + $:&<:)`1:@.(= +. 1 = ])`0:@.<^:(0 < ]) M.
PartsFullN =: PartsN"0 0 >:@i.


PartsNx =: ((- $: ]) + $:&<:)`(1x"_)@.(= +. 1 = ])`(0x"_)@.<^:(0 < ]) M.
PartsFullNx =: (PartsNx"0 0 >:@i.)@x:

The only changes are PartsNx instead of returning 1: or 0: verbs returns 1x"_ 
and 0x"_  .  

1"_ and 0"_ also fail to keep extended precision


these take about 10 seconds each


  +/@:PartsFullNx 500
2300165032574323995027

   +/@:PartsFullN 500
2.30017e21

I don't understand why returning 1 or 0 should break an extended integer list.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to