Crates.io | without_div_sym |
lib.rs | without_div_sym |
version | 0.1.1 |
source | src |
created_at | 2022-09-09 19:26:52.540276 |
updated_at | 2022-09-09 19:43:10.087903 |
description | A fun program to divide between two numbers without the division sign. using some bit wise operation. |
homepage | |
repository | |
max_upload_size | |
id | 662061 |
size | 6,808 |
Contains the geneic function which takes generic type of 2 numbers and returns their resut when divided
let a = 7;
let b = 2;
assert_eq!(Some(3), without_div_sym::divide(a,b));
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