- Join over
**1.5M+ people** - Join over
**100K+ communities** - Free
**without limits** - Create
**your own community**

- Jan 31 2019 21:02LukaJCB commented #758
- Jan 31 2019 20:29
tixxit on master

Fix Polynomial Gen Merge pull request #758 from Lu… (compare)

- Jan 31 2019 20:29tixxit closed #758
- Jan 31 2019 18:55LukaJCB commented #758
- Jan 31 2019 12:07lmazzon starred non/spire
- Jan 31 2019 03:06SethTisue commented #742
- Jan 30 2019 23:41niebloomj starred non/spire
- Jan 30 2019 21:11GusevTimofey starred non/spire
- Jan 30 2019 15:12qsctr starred non/spire
- Jan 30 2019 14:00tusharbihani starred non/spire
- Jan 28 2019 15:07roman0x58 starred non/spire
- Jan 25 2019 14:56invkrh starred non/spire
- Jan 23 2019 18:00
- Jan 23 2019 12:20cwheikki starred non/spire
- Jan 23 2019 02:18
- Jan 22 2019 15:44paulhirschi starred non/spire
- Jan 22 2019 09:46shreyanshp starred non/spire
- Jan 20 2019 12:39midnio starred non/spire
- Jan 20 2019 12:37midnio starred non/spire
- Jan 20 2019 12:34midnio starred non/spire

Excuse my ignorance, but I'm looking to implement a toy crypto system, which requires a finite field under mod N, and wondered whether there was already an instance in spire (or friends)?

Am I also right in that there is no integral

Am I also right in that there is no integral

`Field`

because integral multiplication inverse isn't well defined? Or something to do with complexity of implementing `gcd`

etc.?
Finite fields can be implemented in Spire for sure; fields have trivial euclidean division (as all non zero elements have an inverse), and the GCD is more or less arbitrary.

And indeed, integers do not form a field,

Thanks. This makes sense to me now. The set I'm looking at is definitely a field.

we depend on cats 1.4 and what to depend on latest spire

but it looks like https://mvnrepository.com/artifact/org.typelevel/algebra_2.12/1.0.0 depends on old cats version

):

Moreover, Spire depends on

`cats-kernel`

, which evolves much slower.
it looks like cats are not binary compatible across versions

```
java.lang.NoSuchMethodError: spire.std.package$any$.OrderProduct2(Lcats/kernel/Order;Lcats/kernel/Order;)Lcats/kernel/Order;
at geotrellis.raster.render.BreakMap.geotrellis$raster$render$BreakMap$$vmTree$lzycompute(BreakMap.scala:83)
```

Btw FYI, we had a huge problems with updating FS2 up to 1.0 and still having a dependency of cats core lower than 1.4 :/ that's probably also caused by changes in cats-effects and a lil bit a differnet story, but it looks like they don't follow semver really well.

I'll doublecheck that

or with imports and it weirdly works in some cases. anyway, thanks for your response. Mb we bumped up a version and smth went wrong. Wonderin why tests are passing.

The missing method is actually in Spire; check that you don't have multiple versions present

Note that Spire does not have binary compatibilities as we are not yet at the 1.0 release

actually, that makes no sense. Forget it ;P

turned out I needed a Set instead of an Interval, though (for subtraction and intersection)

I turn it into a list of terms and serialize that

And then I decode in the same way

If there was an implementation using this as the data type (currently I don't think spire's polynomial is implemente like this), then that would be really efficient to serialize. It would just be an array with each element being the coefficient (with zeros for those powers that are missing).

So essentially no need to serialize at all, as the scala representation could match the binary representation.

It would also allow really efficient vectorized computation.

It would also allow really efficient vectorized computation.