Kloosterman Sum Approximation

Evaluate finite Kloosterman exponential sum over invertible residues modulo caller m, using exact modular inverses and floating complex phases; nonunits are omitted, not assigned inverses.

Description

A Kloosterman sum uses both a residue and its modular inverse in each exponential phase.

A Kloosterman sum uses both a residue and its modular inverse in each exponential phase. Only invertible residues contribute.1

Evaluate finite Kloosterman exponential sum over invertible residues modulo caller m, using exact modular inverses and floating complex phases; nonunits are omitted, not assigned inverses.

When to use Kloosterman Sum Approximation

Use this tool to evaluate finite Kloosterman exponential sum over invertible residues modulo caller m, using exact modular inverses and floating complex phases; nonunits are omitted, not assigned inverses.

Choose the integer, sequence, coefficients or function parameters for your calculation. Follow the stated ordering, domain and size limits.

How to use Kloosterman Sum Approximation and understand its results

  1. Choose the integer, sequence, coefficients or function parameters for your calculation. Follow the stated ordering, domain and size limits.
  2. Enter coefficientA, coefficientB, modulus using the field table and calculation rules, then run the tool.
  3. Read finiteKloostermanRealPart, finiteKloostermanImaginaryPart, unitResidueCount. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
coefficientACoefficient anumberRequired
coefficientBCoefficient bnumberRequired
modulusModulusnumberRequired

Use integer modulus 2–10,000 and signed integer coefficients of magnitude ≤one million. Iterate residues 1 through m−1, compute exact modular inverses and accumulate cosine/sine phases. Return real and imaginary parts and unit-residue count.

sum = Σ[gcd(r,m)=1]exp(2πi(ar+b r⁻¹)/m)

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
finiteKloostermanRealPartFinite kloosterman real partnumber
finiteKloostermanImaginaryPartFinite kloosterman imaginary partnumber
unitResidueCountUnit residue countnumber
json
{
  "input": {
    "coefficientA": 1,
    "coefficientB": 1,
    "modulus": 3
  },
  "output": {
    "finiteKloostermanRealPart": -1.0000000000000002,
    "finiteKloostermanImaginaryPart": 2.220446049250313e-16,
    "unitResidueCount": 2
  }
}

Limitations and assumptions

Phase evaluation is floating-point, despite exact integer inverses. Nonunit residues are omitted rather than assigned an inverse.

Numeric inputs and returned numeric values must be finite; an unrepresentable returned value produces an error. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use Gauss Sum Approximation: Evaluate finite quadratic Gauss sum Σ exp(2πi(ax²+bx)/m) over all residues, preserving complex output and exact BigInt phase reduction; distinct from Kloosterman inverse-residue phase. For a complementary task, use Wall-Sun-Sun Prime Checker: Check Fibonacci-Wieferich/Wall–Sun–Sun congruence F_(p−(5/p)) mod p² for actual primes other than 2 and 5 using exact modular doubling; excluded/nonprime inputs explicitly not applicable, no existence claim.

References

  1. Kloosterman Sum Approximation — tool.io

Similar or alternative tools

  • Gauss Sum Approximation

    Evaluate finite quadratic Gauss sum Σ exp(2πi(ax²+bx)/m) over all residues, preserving complex output and exact BigInt phase reduction; distinct from Kloosterman inverse-residue phase.

  • Wall-Sun-Sun Prime Checker

    Check Fibonacci-Wieferich/Wall–Sun–Sun congruence F_(p−(5/p)) mod p² for actual primes other than 2 and 5 using exact modular doubling; excluded/nonprime inputs explicitly not applicable, no existence claim.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies