kaede 0.1.2

Kaede adalah rust library untuk operasi matematika sederhana.
Documentation
  • Coverage
  • 0%
    0 out of 34 items documented0 out of 1 items with examples
  • Size
  • Source code size: 24.69 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 598.64 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 23s Average build duration of successful builds.
  • all releases: 23s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mornsoltice

Kaede

Rust library untuk operasi matematika sederhana, dan akan terus di update mungkin!.

Operasi Yang Didukung

  • Operasi Dasar(Pertambahan, Pengurangan, Perkalian, Pembagian)
  • Integral
  • Modus
  • Deret Geometri
  • Faktorial
  • Fungsi PDF Normal
  • Modulo
  • Logaritma & Logaritma Natural
  • Trigonometri (Sin, Cos, Tan)
  • Eksponen
  • Akar Kuadrat
  • Deret Aritmatika
  • Matrix
  • Simplifikasi Aljabar

Instalasi

Tambahkan dependensi ini ke file Cargo.toml Anda:

[dependencies]

kaede = "0.1"

atau bisa melakukan command

cargo add kaede

Contoh Kode Pertambahan

let result = tambah(5, 3).unwrap();
println!("Hasil penjumlahan: {}", result); // Output: 8

Contoh Kode Pengurangan

let result = kurang(5, 3).unwrap();
println!("Hasil pengurangan: {}", result); // Output: 2

Contoh Kode Perkalian

let result = kali(5, 3).unwrap();
println!("Hasil perkalian: {}", result); // Output: 15

Contoh Kode Pembagian

let result = bagi(6, 3).unwrap();
println!("Hasil pembagian: {}", result); // Output: 2.0

Contoh Kode Integral

let f = |x: f64| x * x;
let result = integral(f, 0.0, 1.0, 1000).unwrap();
println!("Integral: {}", result); // Output: ~0.3333

Contoh Kode Limit

let f = |x: f64| x * x;
let result = limit(f, 2.0, 1e-6).unwrap();
println!("Limit: {}", result); // Output: 4.0

Jumlah Deret Geometri

let result = jumlah_deret_geometri(2, 2, 3).unwrap();
println!("Jumlah deret geometri: {}", result); // Output: 14.0

Modus

let result = modus(vec![1.0, 2.0, 2.0, 3.0, 3.0, 3.0]).unwrap();
println!("Modus: {}", result); // Output: 3.0

Fungsi PDF Normal

let result = normal_pdf(0.0, 0.0, 1.0).unwrap();
println!("PDF Normal: {}", result); // Output: ~0.398942

Faktorial

let result = faktorial(5).unwrap();
println!("Hasil faktorial: {}", result); // Output: 120