title: Modulus Two Float Double Numbers
signature: pub fn modulus_two_float_double_numbers(a: f64, b: f64) -> f64 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: f64, expected: f64)->bool{
  return (actual - expected).abs() < 1e-09
  }
  pub fn driver(a: f64, b: f64, expected: f64)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(a, b), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        3243.229719038493, 5659.926861939672, 
        3243.229719038493
      ));
      
      println!("TEST-1...{}", driver(
        -4362.665881044217, -9196.507113304497, 
        4362.665881044217
      ));
      
      println!("TEST-2...{}", driver(
        7255.066257575837, 2623.200060506935, 
        2008.6661365619666
      ));
      
      println!("TEST-3...{}", driver(
        -6929.554320261099, -3009.0234530313287, 
        911.5074141984414
      ));
      
      println!("TEST-4...{}", driver(
        3569.942027998315, 6920.809419868375, 
        3569.942027998315
      ));
      
      println!("TEST-5...{}", driver(
        -6513.849053096595, -70.95992406437102, 
        56.49596323882673
      ));
      
      println!("TEST-6...{}", driver(
        7333.183189243961, 580.3500610971768, 
        368.98245607783906
      ));
      
      println!("TEST-7...{}", driver(
        -2856.1752826258803, -9625.97442825802, 
        2856.1752826258803
      ));
      
      println!("TEST-8...{}", driver(
        9787.228111241662, 2419.6844962423256, 
        108.4901262723597
      ));
      
      println!("TEST-9...{}", driver(
        -1722.873699288031, -8370.700544254058, 
        1722.873699288031
      ));
      
  }
source_py: def modulus_two_float_double_numbers(a, b):
      if (a < 0):
          a = (- a)
      if (b < 0):
          b = (- b)
      mod = a
      while (mod >= b):
          mod = (mod - b)
      if (a < 0):
          return (- mod)
      return mod
source_cpp: double modulus_two_float_double_numbers(double a, double b) {
    double mod;
    if ( a < 0 ) mod = - a;
    else mod = a;
    if ( b < 0 ) b = - b;
    while ( mod >= b ) mod = mod - b;
    if ( a < 0 ) return - mod;
    return mod;
  }