Isprime optimus [FAST]

版本 1.1 (1.2 KB) 作者: Nicolas Douillet
Primality test using isprime Matlab(r) stock function, but ~60% faster for vectors.
7.0 次下载
更新时间 2024/8/24
Once downloaded, typewrite 'help isprime_optimus' in Matlab console for support.
To benefit from the file documentation attached, be sure to download the files, not to just copy and paste them.
Input
u : a vector of integers sorted in ascending order.
Output
is_prime : logical vector, result of u primality test. size(is_prime) = size(u).
Please don't forget to rate if this code helped you. Thanks ! ;-)

引用格式

Nicolas Douillet (2025). Isprime optimus [FAST] (https://github.com/NicolasDouillet/isprime_optimus/releases/tag/v1.1), GitHub. 检索时间: .

MATLAB 版本兼容性
创建方式 R2019b
兼容任何版本
平台兼容性
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
1.1

要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库
要查看或报告此来自 GitHub 的附加功能中的问题,请访问其 GitHub 仓库