pub fn precomp_single() {
    let single: [[Precomp; 8]; 32] = precompute_single(base_pt);
    let mut concat = String::new();
    for i in 0..32 {
        concat.push_str("//Auto generated file.\n");
        concat.push_str("[\n");
        println!("[");
        for j in 0..8 {
            concat.push_str("Precomp {\nYpX: FieldElement(\n[");
            println!("Precomp {{YpX: FieldElement([");

            let ypx = format!("{}", single[i][j].YpX.0.iter().format(","));
            concat.push_str(&ypx[..]);
            println!("{}", single[i][j].YpX.0.iter().format(","));

            concat.push_str("]),\nYmX: FieldElement(\n[");
            println!("]),\nYmX: FieldElement(\n[");

            let ymx = format!("{}", single[i][j].YmX.0.iter().format(","));
            concat.push_str(&ymx[..]);
            println!("{}", single[i][j].YmX.0.iter().format(","));

            concat.push_str("]),\nXY2d: FieldElement(\n[");
            println!("]), XY2d: FieldElement([");

            let xy2d = format!("{}", single[i][j].XY2d.0.iter().format(","));
            concat.push_str(&xy2d[..]);
            println!("{}", single[i][j].XY2d.0.iter().format(","));
            concat.push_str("]),\n},\n");
            println!("]),}},");
        }
        concat.push_str("],\n");
        println!("],");
    }
    fs::write("./src/precomp_single.rs", concat.into_bytes())
        .unwrap_or_else(|_| panic!("Could not write file: {}", "precomp.rs"));
}
// * This worked, some values are different probably because
// * we performed reduction.
// ! This may generate problems. -- This problem was fixed.
This worked, some values are different probably because
we performed reduction.
This may generate problems. -- This problem was fixed.
This worked some values are different probably because we performed reduction . This may generate problems . -- This problem was fixed .
pub fn precomp_single() {
    let single: [[Precomp; 8]; 32] = precompute_single(base_pt);
    let mut concat = String::new();
    for i in 0..32 {
        concat.push_str("//Auto generated file.\n");
        concat.push_str("[\n");
        println!("[");
        for j in 0..8 {
            concat.push_str("Precomp {\nYpX: FieldElement(\n[");
            println!("Precomp {{YpX: FieldElement([");
            let ypx = format!("{}", single[i][j].YpX.0.iter().format(","));
            concat.push_str(&ypx[..]);
            println!("{}", single[i][j].YpX.0.iter().format(","));
            concat.push_str("]),\nYmX: FieldElement(\n[");
            println!("]),\nYmX: FieldElement(\n[");
            let ymx = format!("{}", single[i][j].YmX.0.iter().format(","));
            concat.push_str(&ymx[..]);
            println!("{}", single[i][j].YmX.0.iter().format(","));
            concat.push_str("]),\nXY2d: FieldElement(\n[");
            println!("]), XY2d: FieldElement([");
            let xy2d = format!("{}", single[i][j].XY2d.0.iter().format(","));
            concat.push_str(&xy2d[..]);
            println!("{}", single[i][j].XY2d.0.iter().format(","));
            concat.push_str("]),\n},\n");
            println!("]),}},");
        }
        concat.push_str("],\n");
        println!("],");
    }
    fs::write("./src/precomp_single.rs", concat.into_bytes())
        .unwrap_or_else(|_| panic!("Could not write file: {}", "precomp.rs"));
}
pub fn precomp_single ( ) { let single : [ [ Precomp ; 8 ] ; 32 ] = precompute_single ( base_pt ) ; let mut concat = String :: new ( ) ; for i in 0 .. 32 { concat . push_str ( " \n " ) ; concat . push_str ( " \n " ) ; println ! ( " " ) ; for j in 0 .. 8 { concat . push_str ( " \n \n " ) ; println ! ( " " ) ; let ypx = format ! ( " " single [ i ] [ j ] YpX 0 iter ( ) format ( " " ) ) ; concat . push_str ( & ypx [ .. ] ) ; println ! ( " " single [ i ] [ j ] YpX 0 iter ( ) format ( " " ) ) ; concat . push_str ( " \n \n " ) ; println ! ( " \n \n " ) ; let ymx = format ! ( " " single [ i ] [ j ] YmX 0 iter ( ) format ( " " ) ) ; concat . push_str ( & ymx [ .. ] ) ; println ! ( " " single [ i ] [ j ] YmX 0 iter ( ) format ( " " ) ) ; concat . push_str ( " \n \n " ) ; println ! ( " " ) ; let xy2d = format ! ( " " single [ i ] [ j ] XY2d 0 iter ( ) format ( " " ) ) ; concat . push_str ( & xy2d [ .. ] ) ; println ! ( " " single [ i ] [ j ] XY2d 0 iter ( ) format ( " " ) ) ; concat . push_str ( " \n \n " ) ; println ! ( " " ) ; } concat . push_str ( " \n " ) ; println ! ( " " ) ; } fs :: write ( " " , concat . into_bytes ( ) ) . unwrap_or_else ( | _ | panic ! ( " " " " ) ) ; }
This worked, some values are different probably because
 we performed reduction.
This worked some values are different probably because we performed reduction .