without_div_sym

Crates.iowithout_div_sym
lib.rswithout_div_sym
version0.1.1
sourcesrc
created_at2022-09-09 19:26:52.540276
updated_at2022-09-09 19:43:10.087903
descriptionA fun program to divide between two numbers without the division sign. using some bit wise operation.
homepage
repository
max_upload_size
id662061
size6,808
peter Abeshi (thormighti)

documentation

README

Contains the geneic function which takes generic type of 2 numbers and returns their resut when divided

Example

let a  = 7;
let b = 2;
   
assert_eq!(Some(3), without_div_sym::divide(a,b));

Problems

This crate doesnt accept floating point number yet. i will work on that on next versions. the example below will cause an error

let a = 15.0;
let b = 5.0;
assert_eq!(some(3.0), without_div_sym::divide(a,b)); // This wont complie, it will bring out an error
    
Commit count: 0

cargo fmt