VestaFq.fromU128 constructor

VestaFq.fromU128(
  1. BigInt v
)

Implementation

factory VestaFq.fromU128(BigInt v) {
  final lower = v.toU64;
  final upper = (v >> 64).toU64;
  VestaFq tmp = VestaFq.from(upper);
  for (int i = 0; i < 64; i++) {
    tmp = tmp.double();
  }
  return tmp + VestaFq.from(lower);
}