Dear all,
I had an issue when calculating the triangular number with the formula
<.@:-:@:(*
>:) in list context. Starting from 5928745 the outcome in list context is
larger than the correct value (additionally calculated with the binomial
coefficient in the first box):

   t=: <.@:-:@:(* >:)
   ((2&!)@:>:; t ;{.@:t@:,~) 5928744
+--------------+--------------+--------------+
|17575005673140|17575005673140|17575005673140|
+--------------+--------------+--------------+
   ((2&!)@:>:; t ;{.@:t@:,~) 5928745
+--------------+--------------+--------------+
|17575011601885|17575011601885|17575011601886|
+--------------+--------------+--------------+
   JVERSION
Engine: j902/j64avx2/windows
Release-a: commercial/2020-12-05T13:36:01
Library: 9.02.08
Platform: Win 64
Installer: J902 install
InstallPath: c:/users/wzhbsn/_/opt/j
Contact: www.jsoftware.com

Thanks. Stefan.
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to