ark-ec 0.3.0

A library for elliptic curves and pairings
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
mod fixed_base;
mod variable_base;
pub use fixed_base::*;
pub use variable_base::*;

/// The result of this function is only approximately `ln(a)`
/// [`Explanation of usage`]
///
/// [`Explanation of usage`]: https://github.com/scipr-lab/zexe/issues/79#issue-556220473
fn ln_without_floats(a: usize) -> usize {
    // log2(a) * ln(2)
    (ark_std::log2(a) * 69 / 100) as usize
}