Skip to content

Conversation

@RDxR10
Copy link

@RDxR10 RDxR10 commented Jan 1, 2023

No description provided.

@RDxR10 RDxR10 changed the title Update bignum_pure.go - Minor edit -> handling zero division in DivModFr Update bignum_pure.go - Minor edit -> handling zero division in InvModFr Jan 1, 2023
}

func InvModFr(dst *Fr, v *Fr) {
func InvModFr(dst *Fr, v *Fr) error {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea is that this function signature matches InvModFr in:

With build tags the performance of different implementations of field-element operations can be compared in benchmarks etc. since a big part of this repository is FFT related code for data-availability-sampling.

And since native divide by zero behaves the same with a panic, and this error return is a breaking API change, I'm a bit hesitant to merge this. What do you use go-kzg for, and what is the motivation for this PR?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just exploring your repo for the sake of learning. This PR is for error handling - might be helpful if used at scale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants