You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: rounding.rs
    path of file: ./repos/kalker/kalk/src/kalk_value
    
    the code of the file until where you have to start completion: use std::collections::HashMap;

use crate::{float, primitive};
use lazy_static::lazy_static;

use s
    
fn equivalent_fraction(value: f64) -> Option<String> {
    fn gcd(mut a: i64, mut b: i64) -> i64 {
        while a != 0 {
            let old_a = a;
            a = b % a;
            b = old_a;
        }

        b.abs()
    }

    let original_sign = value.signum();
    let value = value.abs();
    let abs_value_str = value.to_string();

    // https://goodcalculators.com/repeating-decimal-to-fraction-conversion-calculator/
    let (mut numer, mut denom) = if let Some(repeatend_str) = find_repeatend(&abs_value_str) {
        let dot_pos = abs_value_str.find('.')?;
        let repeatend_pos = abs_value_str[dot_pos..].find(&repeatend_str)? + dot_pos;
        let non_repeating_str = &abs_value_str[..repeatend_pos].trim_end_matches('.');

        // non-repeating
        let non_repeating = non_repeating_str.parse::<f64>().unwrap_or(0f64);
        let non_repeating_dec_count = if let Some(dot_pos) = non_repeating_str.find('.') {
            non_repeating_str.len() - dot_pos - 1
        } else {
            0
        };
        let a = non_repeating.fract();

        // repeatend
        let b = match repeatend_str.parse::<i64>() {
            Ok(b) => b,
            Err(_) => return None,
        };

        let factor = 10i64.pow(non_repeating_dec_count as u32) as f64;
        let nines = (10i64.pow(repeatend_str.len() as u32) - 1) as f64;

        let a_numer = a as f64 * factor * nines;
        let b_numer = b as f64;
        let ab_denom = nines * factor;
        let integer_part_as_numer = non_repeating.trunc() * ab_denom;

        (a_numer + b_numer + integer_part_as_numer, ab_denom)
    } else {
        const PREC: f64 = 10e10f64;

        (value * PREC, PREC)
    };

    let gcd = gcd(numer as i64, denom as i64) as f64;
    numer /= gcd;
    denom /= gcd;

    numer = numer.trunc();
    denom = denom.trunc();

    if denom <= 1f64 || denom >= 100f64 || denom as i64 == 10 {
        return None;
    }

    let integer_part = (numer / denom).trunc();
    if integer_part > 1f64 {
        numer -= integer_part * denom;
        let sign = if original_sign.is_sign_positive() {
            "+"
        } else {
            "-"
        };

        Some(format!(
            "{} {} {}/{}",
            integer_part * original_sign,
            sign,
            numer.abs(),
            denom.abs()
        ))
    } else {
        Some(format!("{}/{}", numer * original_sign, denom))
    }
}