feNeg static method

void feNeg(
  1. FieldElement h,
  2. FieldElement f
)

Implementation

static void feNeg(FieldElement h, FieldElement f) {
  final int f0 = f.h[0];
  final int f1 = f.h[1];
  final int f2 = f.h[2];
  final int f3 = f.h[3];
  final int f4 = f.h[4];
  final int f5 = f.h[5];
  final int f6 = f.h[6];
  final int f7 = f.h[7];
  final int f8 = f.h[8];
  final int f9 = f.h[9];
  final int h0 = -f0;
  final int h1 = -f1;
  final int h2 = -f2;
  final int h3 = -f3;
  final int h4 = -f4;
  final int h5 = -f5;
  final int h6 = -f6;
  final int h7 = -f7;
  final int h8 = -f8;
  final int h9 = -f9;
  h.h[0] = h0;
  h.h[1] = h1;
  h.h[2] = h2;
  h.h[3] = h3;
  h.h[4] = h4;
  h.h[5] = h5;
  h.h[6] = h6;
  h.h[7] = h7;
  h.h[8] = h8;
  h.h[9] = h9;
}