<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Clojure Q&amp;A - Recent questions tagged math.combinatorics</title>
<link>https://ask.clojure.org/index.php/tag/math.combinatorics</link>
<description></description>
<item>
<title>fastmath errors in 1.11</title>
<link>https://ask.clojure.org/index.php/11672/fastmath-errors-in-1-11</link>
<description>&lt;p&gt;I'm seeing the following exception when compiling (via &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/athos/clj-check&quot;&gt;athos/clj-check&lt;/a&gt;) some code that uses &lt;code&gt;org.clojure/math.combinatorics&lt;/code&gt; with Clojure 1.11. This same code compiles just fine (no warnings or errors) with Clojure 1.10.3.&lt;/p&gt;
&lt;p&gt;Is this expected?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:clojure.main/message
 &quot;Execution error (IllegalStateException) at fastmath.stats$median_absolute_deviation$fn__3484/invokePrim (stats.clj:227).\nAttempting to call unbound fn: #'fastmath.core/abs\n&quot;,
 :clojure.main/triage
 {:clojure.error/class java.lang.IllegalStateException,
  :clojure.error/line 227,
  :clojure.error/cause
  &quot;Attempting to call unbound fn: #'fastmath.core/abs&quot;,
  :clojure.error/symbol
  fastmath.stats$median_absolute_deviation$fn__3484/invokePrim,
  :clojure.error/source &quot;stats.clj&quot;,
  :clojure.error/phase :execution},
 :clojure.main/trace
 {:via
  [{:type clojure.lang.Compiler$CompilerException,
    :message
    &quot;Syntax error macroexpanding at (fastmath/stats.clj:499:1).&quot;,
    :data
    {:clojure.error/phase :execution,
     :clojure.error/line 499,
     :clojure.error/column 1,
     :clojure.error/source &quot;fastmath/stats.clj&quot;},
    :at [clojure.lang.Compiler load &quot;Compiler.java&quot; 7665]}
   {:type java.lang.IllegalStateException,
    :message &quot;Attempting to call unbound fn: #'fastmath.core/abs&quot;,
    :at [clojure.lang.Var$Unbound throwArity &quot;Var.java&quot; 45]}],
  :trace
  [[clojure.lang.Var$Unbound throwArity &quot;Var.java&quot; 45]
   [clojure.lang.AFn invoke &quot;AFn.java&quot; 32]
   [fastmath.stats$median_absolute_deviation$fn__3484
    invokePrim
    &quot;stats.clj&quot;
    227]
   [fastmath.stats$median_absolute_deviation$fn__3484
    invoke
    &quot;stats.clj&quot;
    -1]
   [clojure.core$map$fn__5935 invoke &quot;core.clj&quot; 2772]
   [clojure.lang.LazySeq sval &quot;LazySeq.java&quot; 42]
   [clojure.lang.LazySeq seq &quot;LazySeq.java&quot; 51]
   [clojure.lang.RT seq &quot;RT.java&quot; 535]
   [clojure.lang.Numbers double_array &quot;Numbers.java&quot; 1259]
   [fastmath.core$seq__GT_double_array invokeStatic &quot;core.clj&quot; 1031]
   [fastmath.core$seq__GT_double_array invoke &quot;core.clj&quot; 1024]
   [fastmath.stats$percentile invokeStatic &quot;stats.clj&quot; 111]
   [fastmath.stats$percentile invokePrim &quot;stats.clj&quot; -1]
   [fastmath.stats$median invokeStatic &quot;stats.clj&quot; 169]
   [fastmath.stats$median invokePrim &quot;stats.clj&quot; -1]
   [fastmath.stats$median_absolute_deviation
    invokeStatic
    &quot;stats.clj&quot;
    227]
   [fastmath.stats$median_absolute_deviation invokePrim &quot;stats.clj&quot; -1]
   [fastmath.stats$stats_map invokeStatic &quot;stats.clj&quot; 472]
   [fastmath.stats$stats_map invoke &quot;stats.clj&quot; 454]
   [fastmath.stats$stats_map invokeStatic &quot;stats.clj&quot; 459]
   [fastmath.stats$stats_map invoke &quot;stats.clj&quot; 454]
   [fastmath.stats$eval3559 invokeStatic &quot;stats.clj&quot; 499]
   [fastmath.stats$eval3559 invoke &quot;stats.clj&quot; 499]
   [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7194]
   [clojure.lang.Compiler load &quot;Compiler.java&quot; 7653]
   [clojure.lang.RT loadResourceScript &quot;RT.java&quot; 381]
   [clojure.lang.RT loadResourceScript &quot;RT.java&quot; 372]
   [clojure.lang.RT load &quot;RT.java&quot; 459]
   [clojure.lang.RT load &quot;RT.java&quot; 424]
   [clojure.core$load$fn__6908 invoke &quot;core.clj&quot; 6161]
   [clojure.core$load invokeStatic &quot;core.clj&quot; 6160]
   [clojure.core$load doInvoke &quot;core.clj&quot; 6144]
   [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 408]
   [clojure.core$load_one invokeStatic &quot;core.clj&quot; 5933]
   [clojure.core$load_one invoke &quot;core.clj&quot; 5928]
   [clojure.core$load_lib$fn__6850 invoke &quot;core.clj&quot; 5975]
   [clojure.core$load_lib invokeStatic &quot;core.clj&quot; 5974]
   [clojure.core$load_lib doInvoke &quot;core.clj&quot; 5953]
   [clojure.lang.RestFn applyTo &quot;RestFn.java&quot; 142]
   [clojure.core$apply invokeStatic &quot;core.clj&quot; 669]
   [clojure.core$load_libs invokeStatic &quot;core.clj&quot; 6016]
   [clojure.core$load_libs doInvoke &quot;core.clj&quot; 6000]
   [clojure.lang.RestFn applyTo &quot;RestFn.java&quot; 137]
   [clojure.core$apply invokeStatic &quot;core.clj&quot; 669]
   [clojure.core$require invokeStatic &quot;core.clj&quot; 6038]
   [clojure.core$require doInvoke &quot;core.clj&quot; 6038]
   [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 703]
   [clojure2d.color$eval1064$loading__6789__auto____1065
    invoke
    &quot;color.clj&quot;
    1]
   [clojure2d.color$eval1064 invokeStatic &quot;color.clj&quot; 1]
   [clojure2d.color$eval1064 invoke &quot;color.clj&quot; 1]
   [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7194]
   [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7183]
   [clojure.lang.Compiler load &quot;Compiler.java&quot; 7653]
   [clojure.lang.RT loadResourceScript &quot;RT.java&quot; 381]
   [clojure.lang.RT loadResourceScript &quot;RT.java&quot; 372]
   [clojure.lang.RT load &quot;RT.java&quot; 459]
   [clojure.lang.RT load &quot;RT.java&quot; 424]
   [clojure.core$load$fn__6908 invoke &quot;core.clj&quot; 6161]
   [clojure.core$load invokeStatic &quot;core.clj&quot; 6160]
   [clojure.core$load doInvoke &quot;core.clj&quot; 6144]
   [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 408]
   [clojure.core$load_one invokeStatic &quot;core.clj&quot; 5933]
   [clojure.core$load_one invoke &quot;core.clj&quot; 5928]
   [clojure.core$load_lib$fn__6850 invoke &quot;core.clj&quot; 5975]
   [clojure.core$load_lib invokeStatic &quot;core.clj&quot; 5974]
   [clojure.core$load_lib doInvoke &quot;core.clj&quot; 5953]
   [clojure.lang.RestFn applyTo &quot;RestFn.java&quot; 142]
   [clojure.core$apply invokeStatic &quot;core.clj&quot; 669]
   [clojure.core$load_libs invokeStatic &quot;core.clj&quot; 6016]
   [clojure.core$load_libs doInvoke &quot;core.clj&quot; 6000]
   [clojure.lang.RestFn applyTo &quot;RestFn.java&quot; 137]
   [clojure.core$apply invokeStatic &quot;core.clj&quot; 669]
   [clojure.core$require invokeStatic &quot;core.clj&quot; 6038]
   [clojure.core$require doInvoke &quot;core.clj&quot; 6038]
   [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 619]
   [clojure2d.core$eval1056$loading__6789__auto____1057
    invoke
    &quot;core.clj&quot;
    1]
   [clojure2d.core$eval1056 invokeStatic &quot;core.clj&quot; 1]
   [clojure2d.core$eval1056 invoke &quot;core.clj&quot; 1]
   [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7194]
   [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7183]
   [clojure.lang.Compiler load &quot;Compiler.java&quot; 7653]
   [clojure.lang.RT loadResourceScript &quot;RT.java&quot; 381]
   [clojure.lang.RT loadResourceScript &quot;RT.java&quot; 372]
   [clojure.lang.RT load &quot;RT.java&quot; 459]
   [clojure.lang.RT load &quot;RT.java&quot; 424]
   [clojure.core$load$fn__6908 invoke &quot;core.clj&quot; 6161]
   [clojure.core$load invokeStatic &quot;core.clj&quot; 6160]
   [clojure.core$load doInvoke &quot;core.clj&quot; 6144]
   [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 408]
   [clojure.core$load_one invokeStatic &quot;core.clj&quot; 5933]
   [clojure.core$load_one invoke &quot;core.clj&quot; 5928]
   [clojure.core$load_lib$fn__6850 invoke &quot;core.clj&quot; 5975]
   [clojure.core$load_lib invokeStatic &quot;core.clj&quot; 5974]
   [clojure.core$load_lib doInvoke &quot;core.clj&quot; 5953]
   [clojure.lang.RestFn applyTo &quot;RestFn.java&quot; 142]
   [clojure.core$apply invokeStatic &quot;core.clj&quot; 669]
   [clojure.core$load_libs invokeStatic &quot;core.clj&quot; 6016]
   [clojure.core$load_libs doInvoke &quot;core.clj&quot; 6000]
   [clojure.lang.RestFn applyTo &quot;RestFn.java&quot; 137]
   [clojure.core$apply invokeStatic &quot;core.clj&quot; 669]
   [clojure.core$require invokeStatic &quot;core.clj&quot; 6038]
   [clojure.core$require doInvoke &quot;core.clj&quot; 6038]
   [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 421]
   [gravity.gui$eval1048$loading__6789__auto____1049
    invoke
    &quot;gui.clj&quot;
    20]
   [gravity.gui$eval1048 invokeStatic &quot;gui.clj&quot; 20]
   [gravity.gui$eval1048 invoke &quot;gui.clj&quot; 20]
   [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7194]
   [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7183]
   [clojure.lang.Compiler load &quot;Compiler.java&quot; 7653]
   [clojure.lang.RT loadResourceScript &quot;RT.java&quot; 381]
   [clojure.lang.RT loadResourceScript &quot;RT.java&quot; 372]
   [clojure.lang.RT load &quot;RT.java&quot; 459]
   [clojure.lang.RT load &quot;RT.java&quot; 424]
   [clojure.core$load$fn__6908 invoke &quot;core.clj&quot; 6161]
   [clojure.core$load invokeStatic &quot;core.clj&quot; 6160]
   [clojure.core$load doInvoke &quot;core.clj&quot; 6144]
   [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 408]
   [clj_check.check$check_ns invokeStatic &quot;check.clj&quot; 15]
   [clj_check.check$check_ns invoke &quot;check.clj&quot; 9]
   [clojure.core$map$fn__5931$fn__5932 invoke &quot;core.clj&quot; 2759]
   [clojure.lang.TransformerIterator
    step
    &quot;TransformerIterator.java&quot;
    79]
   [clojure.lang.TransformerIterator
    hasNext
    &quot;TransformerIterator.java&quot;
    97]
   [clojure.lang.RT chunkIteratorSeq &quot;RT.java&quot; 517]
   [clojure.core$sequence invokeStatic &quot;core.clj&quot; 2679]
   [clojure.core$sequence invoke &quot;core.clj&quot; 2664]
   [clj_check.check$check invokeStatic &quot;check.clj&quot; 25]
   [clj_check.check$check invoke &quot;check.clj&quot; 19]
   [clj_check.check$_main invokeStatic &quot;check.clj&quot; 33]
   [clj_check.check$_main doInvoke &quot;check.clj&quot; 32]
   [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 397]
   [clojure.lang.AFn applyToHelper &quot;AFn.java&quot; 152]
   [clojure.lang.RestFn applyTo &quot;RestFn.java&quot; 132]
   [clojure.lang.Var applyTo &quot;Var.java&quot; 705]
   [clojure.core$apply invokeStatic &quot;core.clj&quot; 667]
   [clojure.main$main_opt invokeStatic &quot;main.clj&quot; 514]
   [clojure.main$main_opt invoke &quot;main.clj&quot; 510]
   [clojure.main$main invokeStatic &quot;main.clj&quot; 664]
   [clojure.main$main doInvoke &quot;main.clj&quot; 616]
   [clojure.lang.RestFn applyTo &quot;RestFn.java&quot; 137]
   [clojure.lang.Var applyTo &quot;Var.java&quot; 705]
   [clojure.main main &quot;main.java&quot; 40]],
  :cause &quot;Attempting to call unbound fn: #'fastmath.core/abs&quot;,
  :phase :execution}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The code in question is &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/pmonks/gravity&quot;&gt;here&lt;/a&gt;, and this issue can be demonstrated by switching the Clojure version in &lt;code&gt;deps.edn&lt;/code&gt; between &lt;code&gt;1.10.3&lt;/code&gt; and &lt;code&gt;1.11.0&lt;/code&gt;, then executing &lt;code&gt;clj -M:check&lt;/code&gt; at the command line.&lt;/p&gt;
&lt;p&gt;Oh and this was on OpenJDK Runtime Environment Temurin-17.0.2+8 (build 17.0.2+8) on macOS 12.3 (64bit Intel), if that's helpful context.&lt;/p&gt;
</description>
<category>Clojure</category>
<guid isPermaLink="true">https://ask.clojure.org/index.php/11672/fastmath-errors-in-1-11</guid>
<pubDate>Thu, 24 Mar 2022 19:36:56 +0000</pubDate>
</item>
</channel>
</rss>