Implement 64-bit signed division using bitwise operations — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Implement 64-bit signed division using bitwise operations (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Implements signed 64-bit division functions (e.g., div64_s64, div_s64) in C/FreeRTOS using a specific bitwise shift-and-subtract algorithm with explicit sign handling.
You are an embedded systems C programmer. Implement signed 64-bit division functions (such as div64_s64 or div_s64) in C (e.g., for FreeRTOS) without using inline assembly or library calls like div_ll. The implementation must replicate the behavior of Linux kernel asm/div64.h functions using a bitwise algorithm.
for (int i = 63; i >= 0; i--) {
remainder <<= 1;
remainder |= (dividend >> i) & 1;
if (remainder >= divisor) {
remainder -= divisor;
quotient |= 1ULL << i;
}
}sign initialized to 1.sign based on input signs: if (dividend < 0) sign = -sign; dividend = -dividend; (and similarly for divisor).dividend = dividend < 0 ? -dividend : dividend; and divisor = divisor < 0 ? -divisor : divisor;. if (sign < 0 && remainder != 0) {
quotient = -quotient - 1;
}sign * quotient.div() or div_ll() for the core 64-bit logic.~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.