brain
tamnd's digital brain — notes, problems, research
43815 notes
Section 4.
Let $b,v\in\mathbb{Z}$ with $1\le v<b$.
Let the dividend be $(u_3 u_2 u_1 u_0)_{10} = (8500)_{10}$ and the divisor be $(v_2 v_1 v_0)_{10} = (101)_{10}$.
**Solution to Exercise 4.
Let $u$ and $v$ be positive integers with $n$ digits in base $b$, written in the notation of Exercises 19 and 20: u = u_{n-1} b^{\,n-1} + u_{n-2} b^{\,n-2} + \cdots + u_0, \qquad v = v_{n-1} b^{\,n-1}...
**Solution to Exercise 4.
The solution correctly addresses the exercise.
In the setting of Fig.
We prove the validity of Algorithm M by induction on the outer loop variable $j$, using the method of inductive assertions from Section 1.
The solution correctly addresses the exercise.
Let the multiplicand be stored in memory as U=(u_{n-1}\ldots u_1u_0)_b, with one digit per word, and let $v$ be a single precision number,
Exercise 4.
Exercise 4.
Compare the digits beginning with the most significant position.
Program S represents the quantity $1+k$ in register A.
Exercise 5 of section 4.
Exercise 4.
We are asked to design an algorithm that adds two numbers digit by digit from **most significant to least significant**, producing each output digit only when it cannot possibly be affected by future...
Unusual activity has been detected from your device.
A single-precision floating point number in MIX, as defined in Section 4.
Exercise 4.
**Solution: Generalizing Algorithm A for Column Addition of $m$ Nonnegative $n$-Place Integers** Let $x_1, x_2, \dots, x_m$ be $m$ nonnegative integers, each expressed in base $b$ as $n$-digit numbers...
We restate (10) in the form relevant here.
Let $U$ be uniformly distributed on $[0,1)$.
Let a page of the antilogarithm table correspond to a fixed interval of the argument $y = \log_{10} x$, for example a unit interval $[k, k+1)$, where the table returns $x = 10^y$.
Let a positive normalized radix $16$ floating point number have fraction part $f$ satisfying $1/16 \le f < 1$.
This exercise is experimental.
Let $U>0$ be a floating decimal number.
A single-precision floating point number in MIX, as defined in Section 4.
**Exercise 4.
Write the floating point decimal numbers in normalized form: u=10^{e_u}f_u,\qquad v=10^{e_v}f_v, where
**Exercise 4.
Program M computes a double-precision product by expanding each normalized operand into high and low halves, forming four partial products, then discarding all terms that lie strictly to the right of...
Program **B** is designed to perform a sequence of numerical calculations using the X-register of a hypothetical or HP-style RPN calculator.
We are asked to determine all pairs $(a, b)$ such that \text{round}(b, \text{even}(x)) = \lfloor ax + b \rfloor + \lfloor ax - b \rfloor holds for all real $x$.
We write all numbers in the TAOCP double–precision format with \epsilon = \frac{1}{100}.
Let x(y)=\left(\frac13-y^2\right)(3+3.
The phenomenon arises from catastrophic cancellation.
Let $F$ be the set of floating point numbers in the interval $[x_0 \mathinner{\ldotp\ldotp} x_1]$.
Solution to TAOCP 4.2.2 Exercise 29.
Let x = 1 \ominus u.
Let $u$, $u'$, $v$, and $v'$ be positive floating point numbers such that $u \sim u'$ ($r$) and $v \sim v'$ ($s$), where $r$ and $s$ are small relative errors in normalized arithmetic.
The point is that _cancellation_ is often misunderstood.
The statement is **false**.
We need to construct interval arithmetic for extended floating-point intervals, including signed zeros and infinities, with the ordering -\infty < -x < -0 < 0 < +0 < +x < +\infty for all positive $x$.
**Solution to Exercise 4.
Let T(x)=(x\otimes v)\oslash v, so that
Solution to TAOCP 4.2.2 Exercise 19.
We work in **unnormalized floating-point arithmetic** with base $b$ and precision $p$, and assume that no overflow or underflow occurs.
The bug in the previous solution is not in the algorithm itself but in the testing harness and how the function `can_divide` is scoped and used.
The previous solution is completely unrelated to the exercise.
The solution does address the exact question.
We are asked whether, in floating-point arithmetic, the computed midpoint of an interval always lies between the endpoints.
Let $m$ and $n\ne 0$ be integers represented exactly as normalized floating point numbers with $p$ significant digits in base $b$.
Let $u$, $v$, and $w$ be floating point numbers, not necessarily normalized, and consider _unnormalized multiplication_, denoted by $\otimes$.
We are asked to **prove Lemma T** (TAOCP, Section 4.
The proposed solution does **not** answer the question asked.
Equation (33) in Section 4.
Let the radix be $b$ and let the precision be $p$.
In one's complement notation, the value represented by $(e,+.f)$ is $+.f\times 2^e$.
Consider binary floating point arithmetic with a small precision.
We consider each identity in turn, assuming that all operations are normalized floating point operations as defined in Section 4.
**Solution.
The answer is **no**.
All computations are performed in eight-digit floating decimal arithmetic with rounding to the nearest floating point number, as in Section 4.
**Exercise 4.
Assume that $x\ge0$ and $y\ge0$.
The running time of the FADD subroutine in Program A depends on several characteristics of the input floating point numbers $u = (e_u, f_u)$ and $v = (e_v, f_v)$, and on the parameters $b$ (byte size)...
Let the machine be as described: 36-bit words, positive floating numbers represented as (0\,e_1 e_2 \ldots e_6 \, f_1 f_2 \ldots f_{27})_2, with an excess-64 exponent $(e_1\ldots e_6)_2$ and a 27-bit...
The goal is to design a single-word floating-point representation in which the exponent range increases as its magnitude increases, while the precision of the fraction decreases correspondingly.
Let $(a+bi)/(c+di)$ be a complex quotient with real floating point numbers $a$, $b$, $c$, and $d$, where $c+d \ne 0$.
We correct the solution by making all intermediate operations explicit in MIX terms and by giving a complete MIXAL-level subroutine.
The key failure in the previous solution is the assumption that rounding only occurs in Algorithm N.
Let the input in register $A$ represent a floating point number in MIX format, possibly unnormalized.
Let the floating point numbers be represented in normalized form with base $b$, precision $p$, and excess-$q$ exponent, as described in Section 4.
We are asked to exhibit normalized, eight-digit floating decimal numbers $u$ and $v$, with excess 50, such that multiplication of $u$ and $v$ results in _rounding overflow_.
We are asked to construct **normalized eight-digit floating decimal numbers** $u$ and $v$ whose **sum produces rounding overflow** in the sense of TAOCP, Section 4.
We consider floating point arithmetic in the context of base-$b$ digits with normalized representation, following Section 4.
**Problem.
Work in the TAOCP floating-point model: base $10$, precision $p=8$, normalized numbers $0.d_1d_2\ldots d_8\times 10^e$, with exponent range $-50\le e<50$.
Let f_e=b^{p-2}F_e, where $F_e$ is an integer.
The answer is determined by the normalization routine used by FADD.
We are asked to determine the largest and smallest positive values representable in a base-$b$, excess-$q$, $p$-digit floating point system, both in general and under the _normalized_ constraint.
We are asked to compute the result of Algorithm A for the given pairs of floating-point numbers in base $b=10$ with precision $p=8$.
The proposed solution does **not** address the exercise that was asked.
Let n=\sum_{i\ge0} a_i2^i, \qquad a_i\in\{-1,0,1\}.
In MIX floating point with byte size $100$, a number is represented as (\text{sign})\,(e,b_1,b_2,b_3,b_4), where
Let S_n=\left\{\sum_{i=0}^{n-1} a_i3^i : a_i\in D=\{-1,0,3\}\right\}, and let
Let A=\left\{\sum_{i\ge 0}\varepsilon_i3^i:\varepsilon_i\in\{0,1\}\right\}, \qquad B=\left\{\sum_{j\ge 0}\delta_j5^j:\delta_j\in\{0,1\}\right\}.
Let u=(\ldots u_3u_2u_1u_0.
Let b_0,b_1,b_2,\ldots be a binary basis, that is, every integer has a unique representation
Let ${T_0, T_1, T_2, \ldots}$ be a collection of sets of nonnegative integers that satisfies **Property B**; that is, every nonnegative integer $n$ can be written uniquely as n = t_0 + t_1 + t_2 + \cd...
A skater moves on horizontal ice with both skate blades in contact with the surface.
Let $z = a + bi$ be a nonzero Gaussian integer, where $a, b \in \mathbb{Z}$.
Let $n$ be a nonzero integer.
Let x=\frac{u}{v}, where $b\ge2$, $u>0$, $v>0$, and
Let D_t=\{0,1,2,3,4,5,6,7,8,10+t\}, \qquad t=0,1,2,\ldots We shall prove that every $D_t$ satisfies conditions (i), (ii), and (iii).
Let $D={d_1,\dots,d_b}\subset \mathbb{R}$ be a finite digit set with the property that every positive real number admits at least one representation of the form x=\sum_{k\le n} a_k b^k,\qquad a_k\in D...
**Exercise 4.
Let the digit set be D=\left\{-\frac{9}{2},-\frac{7}{2},-\frac{5}{2},-\frac{3}{2},-\frac{1}{2},\frac{1}{2},\frac{3}{2},\frac{5}{2},\frac{7}{2},\frac{9}{2}\right\}.