# When is a bigint not a bigint, sequential reduce issue

**URL:** <https://chapel.discourse.group/t/when-is-a-bigint-not-a-bigint-sequential-reduce-issue/948>\
**Category:** Users\
**Created:** [October 2, 2020, 5:34pm UTC](https://chapel.discourse.group/t/when-is-a-bigint-not-a-bigint-sequential-reduce-issue/948 "2020-10-02T17:34:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Russel](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/russel/32/52_2.png) [@Russel](https://chapel.discourse.group/u/Russel)\
**Post date:** [October 2, 2020, 5:34pm UTC](https://chapel.discourse.group/t/when-is-a-bigint-not-a-bigint-sequential-reduce-issue/948/1 "2020-10-02T17:34:42Z")

</div>

I have the code fragment:

```auto
const one = new bigint(1);
…
proc reductive_sequential(n: bigint): bigint {
  assert(n >= 0);
  return * reduce for i in one..n do i;
}

```

in the file src/factorial.chpl. Line 43 is the return statement of the procedure. On compilation, I get:

```auto
chpl -o factorial_test --main-module factorial_test src/factorial.chpl test/factorial_test.chpl
src/factorial.chpl:41: In function 'reductive_sequential':
src/factorial.chpl:43: error: Bounds of 'low..high' must be integers of compatible types.

```

which is a bit surprising. I am fairly sure this code has compiled OK in the past, with a compiler prior to 1.22.1.

---

<div class="post-metadata">

**Author:** ![bradcray](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/bradcray/32/72_2.png) [@bradcray](https://chapel.discourse.group/u/bradcray)\
**Post date:** [October 2, 2020, 5:47pm UTC](https://chapel.discourse.group/t/when-is-a-bigint-not-a-bigint-sequential-reduce-issue/948/2 "2020-10-02T17:47:32Z")

</div>

Hi Russel —

Unfortunately, [ranges of `bigint` are not yet supported](https://github.com/chapel-lang/chapel/issues/9865), and this error message’s choice of wording is poor, so doesn’t make that clear.

At some point, I had a branch that got us 95% to the way of having bigint ranges working, but before I got the final 5% done, I got distracted by other things and have never gotten back to it. It would be interesting to try again today and see if it worked better. I think I may have had you testing a version of that branch at some point, which may be why you thought this had been supported in the past (?).

Sorry that we haven’t added this yet… it’s slipped out of my mind for most of the past year (but this is a good reminder),  
-Brad

---

<div class="post-metadata">

**Author:** ![Russel](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/russel/32/52_2.png) [@Russel](https://chapel.discourse.group/u/Russel)\
**Post date:** [October 2, 2020, 5:51pm UTC](https://chapel.discourse.group/t/when-is-a-bigint-not-a-bigint-sequential-reduce-issue/948/3 "2020-10-02T17:51:03Z")

</div>

I appear to have forgotten a lot of things I was trying when I was last playing with Chapel! 😉

---

<div class="post-metadata">

**Author:** ![bradcray](https://yyz2.discourse-cdn.com/free1/user_avatar/chapel.discourse.group/bradcray/32/72_2.png) [@bradcray](https://chapel.discourse.group/u/bradcray)\
**Post date:** [October 2, 2020, 5:52pm UTC](https://chapel.discourse.group/t/when-is-a-bigint-not-a-bigint-sequential-reduce-issue/948/4 "2020-10-02T17:52:43Z")

</div>

You’re not alone! I went pretty far with trying to compile versions of your test before remembering the state of things myself.
