original_string: public static function compare_floats($v1, $v2, string $operator = '===', int $precision = 4): bool
    {
      $v1 = round((float)$v1 * pow(10, $precision));
      $v2 = round((float)$v2 * pow(10, $precision));
      switch ($operator ){
        case '===':
          return $v1 === $v2;
        case '==':
          return $v1 == $v2;
        case '>=':
          return $v1 >= $v2;
        case '<=':
          return $v1 <= $v2;
        case '>':
          return $v1 > $v2;
        case '<':
          return $v1 < $v2;
      }
      return false;
    }
code: public static function compare_floats($v1, $v2, string $operator = '===', int $precision = 4): bool
    {
      $v1 = round((float)$v1 * pow(10, $precision));
      $v2 = round((float)$v2 * pow(10, $precision));
      switch ($operator ){
        case '===':
          return $v1 === $v2;
        case '==':
          return $v1 == $v2;
        case '>=':
          return $v1 >= $v2;
        case '<=':
          return $v1 <= $v2;
        case '>':
          return $v1 > $v2;
        case '<':
          return $v1 < $v2;
      }
      return false;
    }
code_tokens: public static function compare_floats ( $ v1 , $ v2 , string $ operator = '===' , int $ precision = 4 ) : bool { $ v1 = round ( ( float ) $ v1 * pow ( 10 , $ precision ) ) ; $ v2 = round ( ( float ) $ v2 * pow ( 10 , $ precision ) ) ; switch ( $ operator ) { case '===' : return $ v1 === $ v2 ; case '==' : return $ v1 == $ v2 ; case '>=' : return $ v1 >= $ v2 ; case '<=' : return $ v1 <= $ v2 ; case '>' : return $ v1 > $ v2 ; case '<' : return $ v1 < $ v2 ; } return false ; }
docstring: Compares two float numbers with the given operator.
  
  @param float $v1
  @param float $v2
  @param string $operator
  @param int $precision
  @return boolean
docstring_tokens: Compares two float numbers with the given operator .