全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Binary fraction?

Definition 4.1 High School Computer Science · 第 4 章 — Floating-Point Numbers

A binary fraction is a number written in base 22 with digits after a binary point: 0.b1b2b3…0.b_1 b_2 b_3 \dots stands for b1⋅12+b2⋅14+b3⋅18+…b_1 \cdot \tfrac12 + b_2 \cdot \tfrac14 + b_3 \cdot \tfrac18 + \dots, each position worth half of the one on its left. A number has a binary fraction with finitely many digits exactly when it is a fraction whose denominator can be a power of two.

The doubling method on 0.1. The fraction 0.2 comes back after four steps, so 0.1 is 0.0\,0011\,0011\,0011… in base 2.
The doubling method on 0.10.1. The fraction 0.20.2 comes back after four steps, so 0.10.1 is 0.0 0011 0011 0011…0.0\,0011\,0011\,0011\dots in base 22.
在原文中阅读 →