# Exact Analysis of the Finite Precision Error Generated in Important Chaotic Maps and Complete Numerical Remedy of These Schemes

^{1}

^{2}

^{3}

^{*}

## Abstract

**:**

## 1. Introduction

#### Brief Summary and Organization of the Present Work

## 2. Employed Symbolism, Notation and a Number of Fundamental Definitions

#### Abbreviations and Employed Notation

- Acronym e. d. d. stands for “erroneous decimal digits”, while acronym c. d. d. stands for “correct decimal digits” and acronym d. d. stands for “decimal digits”.
- The abbreviation f. p. e. stands for “finite precision error”. We note, in passing, that a number of researchers prefer the name “round-off error” to the “finite precision” one. However, we will establish in the following that the generated and accumulated error in an algorithm, after a number of iterations, when it is executed, is not a “round off error” anymore; for this reason, we have definitely preferred to use the term f. p. e.
- The term “the algorithm is destroyed due to f. p. e.” or “the algorithm fails” expresses the fact that the algorithm in hand offers completely unreliable/erroneous results, at a specific recursion.

**Definition**

**1.**

_{1}= 5.1234

**5678912**× 10

^{9},

n

_{2}= 5.1234

**7654321**× 10

^{9}

- $\tau =\rho =9$
- $n=12$
- Their absolute difference is $\left|{n}_{1}-{n}_{2}\right|=1.975409\times {10}^{4}$

- $\tau =\rho =8$
- $n=16$
- Their absolute difference is $\left|{n}_{1}-{n}_{2}\right|=5.350000000000000\times {10}^{1}$

- $n=10$
- $\tau \in {\rm Z}$
- $\left|{n}_{1}-{n}_{2}\right|=1\times {10}^{-10+\tau}$

**Definition**

**2.**

## 3. Establishing That in an Arbitrary Subtraction the Finite Precision Error Consists of Two Types: A Deterministic and an Erratic One

#### 3.1. The Deterministic f. p. Error during Subtraction

**Example**

**1.**

**Example**

**2.**

**Proposition**

**1.**

**Proof**

**of**

**Proposition**

**1.**

#### 3.2. The Erratic Finite Precision Error Appearing in the Operation of Subtraction

- Suppose that the first digit to be replaced is the one located at the $\psi -th$ position, where $\psi ={\lambda}^{c}-d+1$; according to the convention in symbolism adopted in the present work, ${\lambda}^{c}$ is the number of the correct most significant (MS) decimal digits and $d$ the exponent’s eventual plunge occurring after the subtraction (Section 3.1). Then, the event of obtaining an additional correct decimal digit is equivalent to the event that the computing machine fills the $\psi -th$ position of the mantissa of difference ${s}_{n}$ with the correct digit.
- The event of obtaining two correct decimal digits in the mantissa of ${s}_{n}$ is equivalent to the case where the machine fills both the $\psi -th$ and $\left(\psi +1\right)-th$ digits with the correct ones and so forth.
- The eventuality that the number of correct d. d. after the evaluation of the deterministic error is increased by one, is equivalent to the case where the round-off procedure that occurs in the $\psi -th$ position of the mantissa of ${s}_{n}$, generates an additional erroneous decimal digit.
- Clearly, if the round-off approximation that the machine performs in the mantissa of ${s}_{n}$ does not generate an additional erroneous d. d., then the erratic error does not change the effects of the deterministic one.

## 4. Finite Precision Error Analysis and Stabilization of Bernoulli Map

#### 4.1. A Brief Description of Bernoulli’s Map and Its Finite Precision Error Properties

#### 4.2. The Actual Cause of Failure of the Bernoulli Map Due to Finite Precision

**Lemma**

**1.**

- i.
- If$\left|\omega \xb7man\left(z\right)\right|\ge 10$and$\left|\omega \xb7man\left({z}^{e}\right)\right|<10$ ⇒ $\omega \xb7z$ is computed with an additional correct decimal digit in its mantissa in comparison with $z$.
- ii.
- If$\left|\omega \xb7man\left(z\right)\right|<10$and$\left|\omega \xb7man\left({z}^{e}\right)\right|\ge 10$⇒ quantity$\omega \xb7z$is computed with one less correct digit than$z$.
- iii.
- If$\left|\omega \xb7man\left(z\right)\right|<10$and$\left|\omega \xb7man\left({z}^{e}\right)\right|<10$hold ⇒ quantities$\omega \xb7z$and$z$are computed with$\lambda $erroneous decimal digits in their mantissa. The same occurs when$\left|\omega \xb7man\left(z\right)\right|\ge 10$and$\left|\omega \xb7man\left({z}^{e}\right)\right|\ge 10$simultaneously hold.

**Proof**

**of**

**Lemma**

**1.**

- 1.
- $\left|\omega \xb7man\left(z\right)\right|\ge 10$ and $\left|\omega \xb7man\left({z}^{e}\right)\right|<10$ simultaneously hold.

- 2.
- $\left|\omega \xb7man\left(z\right)\right|<10$ and $\left|\omega \xb7man\left({z}^{e}\right)\right|\ge 10$ simultaneously hold. Now, one deduces:

- 3.
- $\left|\omega \xb7man\left(z\right)\right|<10$ and $\left|\omega \xb7man\left({z}^{e}\right)\right|<10$ simultaneously hold or $\left|\omega \xb7z\right|\ge 10$ and $\left|\omega \xb7man\left({z}^{e}\right)\right|\ge 10$ are verified.

_{1}= 1.10045420000000

**1**× 10

^{−2}where the last digit ‘1’, shown in bold, is erroneous. The actual cause for the generation of this erroneous decimal digit, according to the analysis of Section 3, is the following: Multiplication $2{x}_{0}$ generates a quantity of order ${10}^{0}$. When one (9) is subtracted from it, the result is a quantity of order ${10}^{-2}$; in other words, a plunge of order two takes place in the exponent of the obtained result. In fact,

_{1}= 2x

_{0}− 1 = 1.011004542000000 × 10

^{0}− 1 ⇒

x

_{1}= 1.10045420000000

**1**× 10

^{−2}

_{2}= 2.20090840000000

**1**× 10

^{−2},

x

_{3}= 4.40181680000000

**2**× 10

^{−2},

x

_{4}= 8.80363360000000

**5**× 10

^{−2},

_{5}= 1.76072672000000

**1**× 10

^{−1}

_{6}= 3.52145344000000

**2**× 10

^{−1}

x

_{7}= 7.04290688000000

**4**× 10

^{−1}

x

_{8}= 4.08581376000000

**8**× 10

^{−1}.

_{9}= 8.1716275200000

**15**× 10

^{−1}

_{10}= 6.3432550400000

**31**× 10

^{−1}

x

_{11}= 2.6865100800000

**62**× 10

^{−1}

_{12}= 5.373020160000

**124**× 10

^{−1}

_{13}= 7.46040320000

**2475**× 10

^{−2}

_{17}= 3.87329024000

**7918**× 10

^{−1}

_{18}= 7.7465804800

**15837**× 10

^{−1}

_{19}= 5.4931609600

**31673**× 10

^{−1}

_{20}= 9.863219200

**633466**× 10

^{−2}

#### 4.3. Obtaining a Bernoulli Map Free of Finite Precision Error

- A.
- The classical method of Bernoulli map computation offers completely unreliable/erroneous results after fifty-three (53) iterations, when it is implemented by the standard hardware double precision arithmetic (IEEE 754 double-precision floating-point format). Here are the results where the algorithm fails completely for the first time:

- B.
- When mantissa of twenty thousand (20,000) decimal digits precision is used, the classical method of Bernoulli map gives incorrect results after the 16th d. d. in the 66,387-th recursion. We will manifest this failure of the classical algorithm, by projecting the obtained results in seventeen (17) decimal digits due to obvious space limitations. Then, one obtains.

_{66386}= 7.809960427520000

**0**× 10

^{−1}

x

_{66387}= 5.619920855039999

**7**× 10

^{−1}

_{66386}= 7.809960427520000

**0**× 10

^{−1}

x

_{66387}= 5.619920855040000

**0**× 10

^{−1}

- C.
- The method proposed in the present work continues to give totally error free results. Actually, the computation of the classical Bernoulli map performed in forty thousand (40,000) decimal digits failed completely, while the proposed method continued to give absolutely correct results. Evidently, the failure of the classical Bernoulli map and the error free results of the proposed method have been verified by comparing them with the corresponding results generated when eighty thousand (80,000) decimal digits in the mantissa have been use.

## 5. Finite Precision Error Analysis and Stabilization of Baker’s Map

#### 5.1. A Brief Description of Baker’s Map and Its Finite Precision Error Properties

#### 5.2. The Actual Cause of Failure of the Baker’s Map Due to Finite Precision

- Execution of the subtraction $\left(1-{x}_{k}\right)$, whenever necessary, generates a plunge of order $d$ in the exponent of the obtained result; equivalently the closer ${x}_{k}$ is to one, the smaller the exponent ${10}^{-d}$ of the difference and hence, according to Proposition 1, the greater the number of decimal digits of ${x}_{k+1}$ that they will be erroneous, as far as the deterministic f. p. error is concerned.
- On the other hand, multiplication of quantity $\left(1-{x}_{k}\right)$ by two may modify the deterministic error, according to the results of Lemma 1. In fact, if conditions of Case (ii) of Lemma 1 occur, then the overall f. p. e. increases by one decimal digit in comparison with the causal finite precision error.
- For similar reasons, multiplication of ${x}_{k}$ by two also may increase the overall number of the already generated and/or accumulated erroneous digits, again when Case (ii) of Lemma 1 holds. Thus, in the end, the accumulation of f. p. e. becomes dominant and the folded Baker’s map fails, after an impressively small number of iterations.

- We note that the operation $\left(1-\frac{{y}_{k}}{2}\right)$ may indeed generate f. p. e. However, in contrast to what happens in the ${x}_{k+1}$ computation, the plunge of the exponent of the obtained result ${y}_{k+1}$ is one (9) when ${y}_{k}>0,$ since inequality $0\le \frac{{y}_{k}}{2}<\frac{1}{2}$ always holds. Consequently, ${y}_{k+1}$ may be computed with one erroneous d. d. at most, due to the exponent’s plunge of one, according to Proposition 1. We must point out that an additional erratic error is not generated this time, because the term 1 in $\left(1-\frac{{y}_{k}}{2}\right)$ is error free.
- At the same time, each division of ${y}_{k}$ by two also divides the amount of error with which ${y}_{k+1}$ is produced. One may safely say that two or three successive divisions by two (2) in practice reduce the number of the accumulated e. d. d. by one decimal digit. Moreover, the essence of the folded Baker’s map algorithm itself, forces the operation of division $\frac{{y}_{k}}{2}$ to occur after a rather quite limited number of subtractions of type $\left(1-\frac{{y}_{k}}{2}\right).$

#### 5.3. A Method for Generating the Baker’s Map Elements Free of Finite Precision Error

- When the initial value ${x}_{0}$, is of order ${10}^{-\rho}$, with a finite number $n$ of decimal digits in the mantissa, then quantity ${x}_{k+1}$ of folded Baker’s map is always correctly computed, should $n+\rho -1\le 2n$ decimal digits in the mantissa were employed. The justification of this statement follows with arguments completely analogous to the ones stated in the Bernoulli’s map case.
- Therefore, one may apply a very similar method to the one presented in Section 4.3, in order to stabilize the component ${x}_{k+1}$ of folded Baker’s map, too. Extended experiments, performed by the authors, fully support this statement.

## 6. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## References

- Selvam, A.M. Chaotic Climate Dynamics; Luniver Press: Bristol, UK, 2007; pp. 67–68. [Google Scholar]
- Tsekeridou, S.; Solachidis, V.; Nikolaidis, N.; Nikolaidis, A.; Tefas, A.; Pitas, I. Statistical Analysis of a Watermarking System. Signal Process.
**2001**, 81, 1273–1293. [Google Scholar] [CrossRef] - Nikolaidis, A.; Pitas, I. Comparison of different chaotic maps with application to image watermarking. Proc. IEEE Int. Symp. Circuits Syst.
**2000**, 5, 509–512. [Google Scholar] - Saito, A.; Yamaguchi, A. Pseudorandom number generation using chaotic true orbits of the Bernoulli map. Chaos Interdiscip. J. Nonlinear Sci.
**2016**, 26, 063122. [Google Scholar] [CrossRef] [PubMed] - de la Fraga, L.G.; Torres-Pérez, E.; Tlelo-Cuautle, E.; Mancillas-López, C. Hardware implementation of pseudo-random number generators based on chaotic maps. Nonlinear Dyn.
**2017**, 90, 1661–1670. [Google Scholar] [CrossRef] - Martínez-González, R.F.; Díaz-Méndez, J.A.; Palacios-Luengas, L.; López-Hernández, J.; Vázquez-Medina, R. A steganographic method using Bernoulli’s chaotic maps. Comput. Electr. Eng.
**2016**, 54, 435–449. [Google Scholar] [CrossRef] - Salleh, M.; Ibrahim, S.; Isnin, I.F. Enhanced chaotic image encryption algorithm based on Baker’s map. Proc. IEEE Int. Symp. Circuits Syst.
**2003**, 2, 11. [Google Scholar] - Gondal, M.A.; Abdul, R.; Hussain, I. A Scheme for Obtaining Secure S-Boxes Based on Chaotic Baker’s Map. 3D Res.
**2014**, 5, 17. [Google Scholar] [CrossRef] - Liu, Y.; Li, J.; Lu, X.; Yuen, C.; Wu, J. A family of chaotic pure analog coding schemes based on baker’s map function. EURASIP J. Adv. Signal Process.
**2015**, 2015, 58. [Google Scholar] [CrossRef][Green Version] - Rogers, A.; Keating, J.; Shorten, R. A novel pattern classification scheme using the Baker’s map. Neurocomputing
**2003**, 55, 779–786. [Google Scholar] [CrossRef][Green Version] - Prasadh, S.K.; Chakole, S.; Mohammed, V.N. Performance Analysis of Chaotic Map Algorithms Comparison of efficiency of Line Map, Bakers and Cat Algorithmfor image cryptography. In Proceedings of the 2018 Fourteenth International Conference on Information Processing (ICINPRO), Bangalore, India, 21–23 December 2018. [Google Scholar]
- Schmitz, R. Use of chaotic dynamical systems in cryptography. J. Frankl. Inst.
**2001**, 338, 429–441. [Google Scholar] [CrossRef]

**Figure 1.**The flowchart of the introduced method for obtaining versions of both Bernoulli and Baker’s maps free of finite precision error; we define “correct_x(${x}_{k},{x}_{k+1},\lambda ,t$ )” to be the procedure. In this figure-flowchart: ${x}_{k},{x}_{k+1}$ are the values offered at the $k-th$ and $\left(k+1\right)-th$ iteration of the classical Bernoulli map, $\lambda $ is the number of incorrect digits appearing in the mantissa of ${x}_{k}$ and $t$ is the necessary extension of the employed finite word length for obtaining f. p. e. free member ${x}_{k+1}$. The exact number of $t$ is $n+2-E\left({x}_{k}\right)$.

**Figure 2.**The chart of the entire flow of the Bernoulli map, which generates finite precision error free results, for tenths of millions of iterations.

**Figure 3.**The chart of the entire flow of the Baker’s map, which generates finite precision error free results, for tens of millions of iterations. The present flowchart also employs the procedure correct_x introduced in the flowchart of Figure 1.

**Table 1.**The probabilities of the deterministic modification of normally distributed finite precision error.

- | $\mathbf{Examples}\mathbf{of}\mathbf{Theoretical}\mathbf{Erratic}\mathbf{Probabilities},\mathbf{Symbolized}\mathbf{as}{\mathit{P}}^{\mathit{e}\mathit{q}},$$\mathbf{during}\mathbf{Subtraction},\mathbf{for}\mathbf{Two}\mathbf{f}.\mathbf{p}.\mathbf{e}.\mathbf{Standard}\mathbf{Deviations}\mathit{\sigma}$ | |
---|---|---|

Number of erroneous d. d. randomly generated during subtraction | First std of the Gaussian pdf ${\sigma}_{1}=1.65$ | Second std of the Gaussian pdf ${\sigma}_{2}=4.9$ |

Increased by one | $6.20\times {10}^{-3}\%$ | $14.31\%$ |

Retained the same | $68.27\%$ | $68.66\%$ |

Reduced by one | $28.06\%$ | $10.86\%$ |

Reduced by two | $3.53\%$ | $1.05\%$ |

Reduced by three | $0.23\%$ | $6.63\times {10}^{-2}\%$ |

No. of Iteration | $\mathbf{Values}\mathbf{of}{\mathit{x}}_{\mathit{k}+1}\mathbf{via}\mathbf{Classical}\mathbf{Method}$ | $\mathbf{Values}\mathbf{of}{\mathit{x}}_{\mathit{k}+1}\mathbf{via}\mathbf{Introduced}\mathbf{Method}$ | $\mathbf{Correct}\mathbf{Values}\mathbf{of}{\mathit{x}}_{\mathit{k}+1}$ |
---|---|---|---|

1 | $6.666713337760000\times {10}^{-1}$ | $6.666713337760000\times {10}^{-1}$ | $6.666713337760000\times {10}^{-1}$ |

2 | $6.666573324480000\times {10}^{-1}$ | $6.666573324480000\times {10}^{-1}$ | $6.666573324480000\times {10}^{-1}$ |

3 | $6.666853351040001\times {10}^{-1}$ | $6.666853351040000\times {10}^{-1}$ | $6.666853351040000\times {10}^{-1}$ |

53 | $\mathbf{7.500000000000000}\times {10}^{-1}$ | $8.359693271040000\times {10}^{-1}$ | $8.359693271040000\times {10}^{-1}$ |

54 | $\mathbf{5.000000000000000}\times {10}^{-1}$ | $3.280613457920000\times {10}^{-1}$ | $3.280613457920000\times {10}^{-1}$ |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Chalatsis, C.; Papaodysseus, C.; Arabadjis, D.; Mamatsis, A.R.; Karadimas, N.V.
Exact Analysis of the Finite Precision Error Generated in Important Chaotic Maps and Complete Numerical Remedy of These Schemes. *Informatics* **2021**, *8*, 54.
https://doi.org/10.3390/informatics8030054

**AMA Style**

Chalatsis C, Papaodysseus C, Arabadjis D, Mamatsis AR, Karadimas NV.
Exact Analysis of the Finite Precision Error Generated in Important Chaotic Maps and Complete Numerical Remedy of These Schemes. *Informatics*. 2021; 8(3):54.
https://doi.org/10.3390/informatics8030054

**Chicago/Turabian Style**

Chalatsis, Constantinos, Constantin Papaodysseus, Dimitris Arabadjis, Athanasios Rafail Mamatsis, and Nikolaos V. Karadimas.
2021. "Exact Analysis of the Finite Precision Error Generated in Important Chaotic Maps and Complete Numerical Remedy of These Schemes" *Informatics* 8, no. 3: 54.
https://doi.org/10.3390/informatics8030054