<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Arithmetic on rustbites</title><link>https://www.rustbites.com/tags/arithmetic/</link><description>Recent content in Arithmetic on rustbites</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 15 Apr 2026 10:32:54 +0200</lastBuildDate><atom:link href="https://www.rustbites.com/tags/arithmetic/index.xml" rel="self" type="application/rss+xml"/><item><title>81. checked_sub_signed — Subtract a Signed Delta From an Unsigned Without Casts</title><link>https://www.rustbites.com/posts/bite-081/</link><pubDate>Tue, 14 Apr 2026 17:00:00 +0100</pubDate><guid>https://www.rustbites.com/posts/bite-081/</guid><description>&lt;p&gt;&lt;code&gt;checked_add_signed&lt;/code&gt; has been around for years. Its missing sibling finally landed: as of Rust 1.91, &lt;code&gt;u64::checked_sub_signed&lt;/code&gt; (and the whole &lt;code&gt;{checked, overflowing, saturating, wrapping}_sub_signed&lt;/code&gt; family) lets you subtract an &lt;code&gt;i64&lt;/code&gt; from a &lt;code&gt;u64&lt;/code&gt; without casting, unsafe, or hand-rolled overflow checks.&lt;/p&gt;</description></item></channel></rss>