Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Counting in binary is just like counting in decimal -- if you are all thumbs. -- Glaser and Way


devel / comp.lang.c / Re: What does (real) number mean?

SubjectAuthor
* What does (real) number mean?wij
+* Re: What does (real) number mean?Keith Thompson
|`- Re: What does (real) number mean?wij
`* Re: What does (real) number mean?wij
 `* Re: What does (real) number mean?Malcolm McLean
  `* Re: What does (real) number mean?wij
   `* Re: What does (real) number mean?Ben Bacarisse
    `- Re: What does (real) number mean?James Kuyper

1
What does (real) number mean?

<f79b41c2-a94f-48c9-bc68-7e3aa581a2a7n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17636&group=comp.lang.c#17636

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:622a:1805:: with SMTP id t5mr20191312qtc.340.1627400452479;
Tue, 27 Jul 2021 08:40:52 -0700 (PDT)
X-Received: by 2002:ac8:1305:: with SMTP id e5mr20291867qtj.350.1627400452283;
Tue, 27 Jul 2021 08:40:52 -0700 (PDT)
Path: i2pn2.org!rocksolid2!i2pn.org!weretis.net!feeder6.news.weretis.net!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 27 Jul 2021 08:40:51 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=58.115.187.102; posting-account=QJ9iEwoAAACyjkKjQAWQOwSEULNvZZkc
NNTP-Posting-Host: 58.115.187.102
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <f79b41c2-a94f-48c9-bc68-7e3aa581a2a7n@googlegroups.com>
Subject: What does (real) number mean?
From: wyni...@gmail.com (wij)
Injection-Date: Tue, 27 Jul 2021 15:40:52 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Lines: 244
 by: wij - Tue, 27 Jul 2021 15:40 UTC

I just combined my number view into a file. Some issues might be interested:
1. Infinity
2. Real axis
3. 'cardinality' of ℝ is greater than ℵ1,ℵ2,ℵ3,...
4. Infinite series
5. 1=√1=√(-1)*(-1)=i*i=-1.

Possible issues about 0.999...=1 (or lim(x->∞) 1/x=0) had been debated for
years (both are wrong).
https://sourceforge.net/projects/cscall/files/MisFiles/Infinity-zh.txt/download
------
+--------------+
| Nomenclature |
+--------------+
Entity::The real object under measurement. We understand and describe the real object
via measurement. What we feel and inside our brain are the results of
measurement, not the real object itself.

Symbol '='::x=y means the occurrence of x can be replaced by y, vice versa.
Note that this is a formal definition. Actual usage is normally accompanied by
an 'equivalence relation=='. If "x=y" is a proposition, then a=b iff a==b.
This definition emphasizes the operational meaning (needed in programming).

Trichotomy Property::Same as well-ordered property. For any two elements a,b, exactly one of the
relation holds: a<b, a==b, or a>b (elements can be sorted). Explanation for
other symbols (<=,>=) are omitted.

Real Axis::A widthless graduated scale for measuring the length or position of an entity.
The division marks on the scale may be referred to as points or
'real numbers'. The marks are the cracks separating the 'continuous space'.
The mark itself has no measure of length, so the point or the number.

Point::The same as in Euclidean geometry. A mark of position, same as the marks on a
graduated scale.

Number::A symbol(operand or expression) that identifies point.

Number '∞'(infinity)::1. ∀n∈ℕ, n<∞
2. The multiplicative inverse of ∞ is 1/∞, the additive inverse is -∞

Distance::The absolute differences between two numbers. For two numbers a,b on the real
axis, d=dist(a,b)=|a-b|. (sometimes, length is used for distance)

Interval::The set of numbers on the real axis between two numbers. E.g. [a,b]≡
{x| x is a number on the real axis, a<=x<=b}. Definition of other kind of
intervals [),(],() are the same as in average mathematics. Note that a single
point x can construct a single-point interval [x,x], dist(x,x)=len(x,x)|x-x|=0.

Density Property::For any two different numbers, there exists another different number in
between. Take interval [a,b] for instance: ∀i,j∈[a,b], i<j such that ∃k,
i<k<j.

Extended ℕ::ℕ∪{∞}, noted as Eℕ

Extended ℤ::ℤ∪{∞}, noted as Eℤ

Extended ℚ::Set {p/q; p,q∈Eℤ, q≠0}, noted as Eℚ

Corollary: The maximal(of minimal) number in an open interval can not be
precisely explicitly shown. (prohibited by density property)

+--------------------------------------------------------------+
| Prop5: Non-zero length interval can not be stuffed by points |
+--------------------------------------------------------------+
Let interval A=[a,b], a<b. Because any point p∈A is 1-1 correspondent to
interval [p,p], p∈[p,p], dist([p,p])=|p-p|=0:
But the maximal possible length of all q numbers of sub-intervals containing
a single point in A is q*0=0.
QED.

Corollary: The 'cardinality' of ℝ is greater than ℵ1,ℵ2,ℵ3,...

+------+
| Line |
+------+
Line::Line is a set of well-ordered points(if in term of points). Conversely, any
well-ordered set could be called a line.

Straight Line::Two different points A,B define a straight line L(A,B)≡ {x| x satisfies
exactly one of the following equations 1:dist(A,x)= dist(A,B)+dist(B,x)
2:dist(x,B)=dist(x,A)+dist(A,B) 3:dist(A,B)=dist(A,x)+dist(x,B)}
I.e. x that satisfies equ-1 is an extended line point from B.
x that satisfies equ-2 is an extended line point from A.
x that satisfies equ-3 is in line [A,B].

Corollary: Real axis is a straight line.
Corollary: The shortest distance between two points is a straight line (this
sentence reads funny).
Corollary: The sum of the length of any two sides of a triangle is greater than
that of the third side.

+-----------------+
| Infinite Series |
+-----------------+
Rule1: Infinite series A,B are equal iff the summand and the index are equal
Rule2: The expanded form of infinite series must list the last addend.
Otherwise, the expanded form is ill-formed (obsecure semantics).

Ex.1 (the last addend is omitted):
A=1+2+3+4+5+...
=(1+2)+(3+4)+5+...
=3+7+5+... // ill-formed, obsecure semantics.

Last addend listed:
A=1+2+3+4+5+...+∞ // well-formed, the exanded form of Σ(n=1,∞) {n}

Ex.2:
S=1+2+4+8+... // ill-formed
<=> S=1+2(1+2+4+8+...)
<=> S=1+2S
<=> S=-1

Last addend listed:
S=1+2+4+8+...+2^∞
<=> S=1+2(1+2+4+...+2^(∞-1))
<=> S=1+2S-2^(∞+1)
<=> S=2^(∞+1)-1 // Lots of similar "magic calculation" deriving the result
// S=-1 can be found in youtube. (the term containing the
// last addend ∞ is ignored)

Ex.3:
"f(n)= Σ(k=0,n) 1/k! => f(∞)=e(The base of natural logarithm)"?
We know for sure ∀n∈ℕ, f(n)∈ℚ. To get the result f(n)=e (f(n)∉ℚ), the only
current option is n=∞. But the issue whether or not f(∞)=e (exact equal by
definition) can only be decided via definition, e.g. e≡f(∞).. Otherwise, we
can only say f(∞)≈e. (In considering the definition of the equal sign '=',
other forms of e are likely not mutually replaceable with f(∞))

Ex.4: x= Σ(n=1,∞) 1/n²
A common expression is x= Σ(n=1,∞) 1/n²= π²/6, therefore, π=√(6*x)
The issue here is: Lots of π can be derived from various infinite serieses.
But, according to the definition of '=', the result of mutual substitution
may become inconsistent.
For now, the uncontroversial definition of π is the ratio of the
circumference of a circle to its diameter, it is safer to use '≈'.
Therefore, Σ(n=1,∞) 1/n² ≈ π²/6

+--------------------------------------+
| Equality of multi-value of n-th root |
+--------------------------------------+
From the fundamental theorem of algebra, square root has two solutions, e.g..
√2=±1.414... Therefore, "√2=1.414..." is not really correct and can cause
contradictory results like n=-n. This is a common case, e.g. If √1=1 is
correct, then 1=√1=√(-1)*(-1)=i*i=-1...

∴ The symbol '√' (or nth root of a number) should mean operation, can not be
substituted with any ascertained number.

+-------------------------------------------------------------------------+
| Prop6: Periodic exponential function is equivalent to constant function |
+-------------------------------------------------------------------------+
Let f:T->T be a computational(decisive) function. x,a,t∈ T. function f
satisfies two properties:
P1: f(x)=f(x+n*t) ... f is periodic of t, ∀n∈ ℕ
P2: f(x)^a=f(a*x) ... f has such an exponential arithmetic property

Lemma1: For any a∈ T, f(x)=f(x+a*t)
Proof: f(x)=f(x+a*t)
=> f(x)^(1/a)=f(x+a*t)^(1/a)
<=> f(x/a)= f(x/a+t) ... from P2
<=> f(x/a)= f(x/a) ... from P1
<=> true

Lemma2: For any a,b∈ T, f(a)=f(b)
Proof: f(a)=f(b)
<=> f(a)=f(a+(b-a))
<=> f(a)=f(a+((b-a)/t)*t)
<=> f(a)=f(a) ... From Lemma1
<=> true

∴ If Lemma2 is converted to text: Function that satisfies P1,P2 are equivalent
to a constant function.

+---------------------+
| De Moivre's formula |
+---------------------+
x,θ∈ ℝ, k∈ ℤ, (cos(θ)+i*sin(θ))^x= cos(x*(θ+2kπ))+i*sin(x*(θ+2kπ))
If simplified using "cis": cis(θ)^x= cis(x*(θ+2kπ))

Note: This section contains unsolved issues, but not important for now.

To prevent issues raised by Prop6 (including issues in the identity
x^(a*b)=(x^(1/b))^a=(x^a)^(1/b)):
1. De Moivre's formula only applicable to complex number (Exponential
operation of real number x must first convert x to a complex number of
cis form. But converting complex of cis(x) form to a+b*i form may suffer
downcast problem)
2. cis(θ)≠cis(θ+2kπ)

Re: What does (real) number mean?

<87lf5rir0c.fsf@nosuchdomain.example.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17639&group=comp.lang.c#17639

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: Keith.S....@gmail.com (Keith Thompson)
Newsgroups: comp.lang.c
Subject: Re: What does (real) number mean?
Date: Tue, 27 Jul 2021 10:52:03 -0700
Organization: None to speak of
Lines: 23
Message-ID: <87lf5rir0c.fsf@nosuchdomain.example.com>
References: <f79b41c2-a94f-48c9-bc68-7e3aa581a2a7n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Info: reader02.eternal-september.org; posting-host="a7fd05aa44f85d437cfb30de78c75b84";
logging-data="673"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+f1RumJuamL+NQyg3jp1wP"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Cancel-Lock: sha1:XYE1uQd+6AMhN6U1liyTcthcArs=
sha1:0jzAFwvf/fSJ87kO9PWo4kEDEDQ=
 by: Keith Thompson - Tue, 27 Jul 2021 17:52 UTC

wij <wyniijj@gmail.com> writes:
> I just combined my number view into a file. Some issues might be interested:
> 1. Infinity
> 2. Real axis
> 3. 'cardinality' of ℝ is greater than ℵ1,ℵ2,ℵ3,...
> 4. Infinite series
> 5. 1=√1=√(-1)*(-1)=i*i=-1.
>
> Possible issues about 0.999...=1 (or lim(x->∞) 1/x=0) had been debated for
> years (both are wrong).
> https://sourceforge.net/projects/cscall/files/MisFiles/Infinity-zh.txt/download

That document is in Chinese, so it won't be useful to most people.

Why did you post this to comp.lang.c? It has nothing to do with the C
programming language.

[snip]

--
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
Working, but not speaking, for Philips
void Void(void) { Void(); } /* The recursive call of the void */

Re: What does (real) number mean?

<b024d4b3-8ad5-4ad1-bd16-9fbc9665ca5dn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17647&group=comp.lang.c#17647

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:aed:2163:: with SMTP id 90mr21721492qtc.186.1627427657594;
Tue, 27 Jul 2021 16:14:17 -0700 (PDT)
X-Received: by 2002:ac8:5a8d:: with SMTP id c13mr21597029qtc.100.1627427657408;
Tue, 27 Jul 2021 16:14:17 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Tue, 27 Jul 2021 16:14:17 -0700 (PDT)
In-Reply-To: <87lf5rir0c.fsf@nosuchdomain.example.com>
Injection-Info: google-groups.googlegroups.com; posting-host=58.115.187.102; posting-account=QJ9iEwoAAACyjkKjQAWQOwSEULNvZZkc
NNTP-Posting-Host: 58.115.187.102
References: <f79b41c2-a94f-48c9-bc68-7e3aa581a2a7n@googlegroups.com> <87lf5rir0c.fsf@nosuchdomain.example.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <b024d4b3-8ad5-4ad1-bd16-9fbc9665ca5dn@googlegroups.com>
Subject: Re: What does (real) number mean?
From: wyni...@gmail.com (wij)
Injection-Date: Tue, 27 Jul 2021 23:14:17 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: wij - Tue, 27 Jul 2021 23:14 UTC

On Wednesday, 28 July 2021 at 01:52:15 UTC+8, Keith Thompson wrote:
> wij <wyn...@gmail.com> writes:
> > I just combined my number view into a file. Some issues might be interested:
> > 1. Infinity
> > 2. Real axis
> > 3. 'cardinality' of ℝ is greater than ℵ1,ℵ2,ℵ3,...
> > 4. Infinite series
> > 5. 1=√1=√(-1)*(-1)=i*i=-1.
> >
> > Possible issues about 0.999...=1 (or lim(x->∞) 1/x=0) had been debated for
> > years (both are wrong).
> > https://sourceforge.net/projects/cscall/files/MisFiles/Infinity-zh.txt/download
> That document is in Chinese, so it won't be useful to most people.

The correct link: (my negligence)
https://sourceforge.net/projects/cscall/files/MisFiles/Infinity-en.txt/download

> Why did you post this to comp.lang.c? It has nothing to do with the C
> programming language.
The preliminary doc. is for a program plan. The number view is made on
programmer's point of view. I thought sometimes somethings like this is not bad.
To C/C++, the immediate effect is the concept and design of INFINITY and real number
I hope someone can spot some inconsistent contents or phrasing errors.

> [snip]
>
> --
> Keith Thompson (The_Other_Keith) Keith.S.T...@gmail.com
> Working, but not speaking, for Philips
> void Void(void) { Void(); } /* The recursive call of the void */

Re: What does (real) number mean?

<bbe400ff-512d-4984-a88f-1653467992abn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17667&group=comp.lang.c#17667

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a05:620a:a5a:: with SMTP id j26mr4368392qka.42.1627552847625;
Thu, 29 Jul 2021 03:00:47 -0700 (PDT)
X-Received: by 2002:a37:aa57:: with SMTP id t84mr4203616qke.371.1627552847433;
Thu, 29 Jul 2021 03:00:47 -0700 (PDT)
Path: i2pn2.org!i2pn.org!news.niel.me!usenet.pasdenom.info!usenet-fr.net!fdn.fr!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 29 Jul 2021 03:00:47 -0700 (PDT)
In-Reply-To: <eb3eee1f-fff9-465a-a9bc-b5df32f848b8n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=58.115.187.102; posting-account=QJ9iEwoAAACyjkKjQAWQOwSEULNvZZkc
NNTP-Posting-Host: 58.115.187.102
References: <f79b41c2-a94f-48c9-bc68-7e3aa581a2a7n@googlegroups.com> <eb3eee1f-fff9-465a-a9bc-b5df32f848b8n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <bbe400ff-512d-4984-a88f-1653467992abn@googlegroups.com>
Subject: Re: What does (real) number mean?
From: wyni...@gmail.com (wij)
Injection-Date: Thu, 29 Jul 2021 10:00:47 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: wij - Thu, 29 Jul 2021 10:00 UTC

On Wednesday, 28 July 2021 at 15:24:34 UTC+8, minf...@arcor.de wrote:
> wij schrieb am Dienstag, 27. Juli 2021 um 17:40:59 UTC+2:
> > I just combined my number view into a file. Some issues might be interested:
> > 1. Infinity
> > 2. Real axis
> > 3. 'cardinality' of ℝ is greater than ℵ1,ℵ2,ℵ3,...
> > 4. Infinite series
> > 5. 1=√1=√(-1)*(-1)=i*i=-1.
> <snip>
>
> Never confuse math with numerics. Prof. Kahan made that very clear.
>
> http://people.eecs.berkeley.edu/~wkahan/ieee754status/why-ieee.pdf
> https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html

The view of real number is different from common math. which clib follows:
floating-point number is 'hoped' to represent real number.
I just think now the symbol INFINITY should be reserved, not for signaling overflow.
There is also a thread of the same topic in comp.theory
https://groups.google.com/g/comp.theory/c/Lr94sLfqFjg

Re: What does (real) number mean?

<31358abf-a486-48ce-94ef-36616b20086cn@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17669&group=comp.lang.c#17669

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:a37:9ec1:: with SMTP id h184mr4451840qke.0.1627553491179;
Thu, 29 Jul 2021 03:11:31 -0700 (PDT)
X-Received: by 2002:ac8:1305:: with SMTP id e5mr3596082qtj.350.1627553491011;
Thu, 29 Jul 2021 03:11:31 -0700 (PDT)
Path: i2pn2.org!i2pn.org!aioe.org!news.mixmin.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 29 Jul 2021 03:11:30 -0700 (PDT)
In-Reply-To: <bbe400ff-512d-4984-a88f-1653467992abn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=2a00:23a8:400a:5601:8858:4b18:be2f:3d93;
posting-account=Dz2zqgkAAADlK5MFu78bw3ab-BRFV4Qn
NNTP-Posting-Host: 2a00:23a8:400a:5601:8858:4b18:be2f:3d93
References: <f79b41c2-a94f-48c9-bc68-7e3aa581a2a7n@googlegroups.com>
<eb3eee1f-fff9-465a-a9bc-b5df32f848b8n@googlegroups.com> <bbe400ff-512d-4984-a88f-1653467992abn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <31358abf-a486-48ce-94ef-36616b20086cn@googlegroups.com>
Subject: Re: What does (real) number mean?
From: malcolm....@gmail.com (Malcolm McLean)
Injection-Date: Thu, 29 Jul 2021 10:11:31 +0000
Content-Type: text/plain; charset="UTF-8"
 by: Malcolm McLean - Thu, 29 Jul 2021 10:11 UTC

On Thursday, 29 July 2021 at 11:00:54 UTC+1, wij wrote:
>
> The view of real number is different from common math. which clib follows:
> floating-point number is 'hoped' to represent real number.
>
Floating point number are a sufficient approximation to real numbers for most
purposes. The exception is when doing certain types of mathematics itself.
>
> I just think now the symbol INFINITY should be reserved, not for signaling overflow.
>
There's no distinction made between "overflow" and "mathematical infinity". You can
of course say that INFINITY represents mathematical infinity in the particular
program you are writing, but this is fraught with dangers. Really you're best using
a package like Mathematica if you want to do maths rather than bit bashing.

Re: What does (real) number mean?

<9cf8f398-f885-49a4-ae20-6cb3dc2eb0c6n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17676&group=comp.lang.c#17676

  copy link   Newsgroups: comp.lang.c
X-Received: by 2002:ac8:75c2:: with SMTP id z2mr4827514qtq.303.1627575688013;
Thu, 29 Jul 2021 09:21:28 -0700 (PDT)
X-Received: by 2002:a37:6453:: with SMTP id y80mr5955801qkb.199.1627575687810;
Thu, 29 Jul 2021 09:21:27 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.lang.c
Date: Thu, 29 Jul 2021 09:21:27 -0700 (PDT)
In-Reply-To: <31358abf-a486-48ce-94ef-36616b20086cn@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=58.115.187.102; posting-account=QJ9iEwoAAACyjkKjQAWQOwSEULNvZZkc
NNTP-Posting-Host: 58.115.187.102
References: <f79b41c2-a94f-48c9-bc68-7e3aa581a2a7n@googlegroups.com>
<eb3eee1f-fff9-465a-a9bc-b5df32f848b8n@googlegroups.com> <bbe400ff-512d-4984-a88f-1653467992abn@googlegroups.com>
<31358abf-a486-48ce-94ef-36616b20086cn@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <9cf8f398-f885-49a4-ae20-6cb3dc2eb0c6n@googlegroups.com>
Subject: Re: What does (real) number mean?
From: wyni...@gmail.com (wij)
Injection-Date: Thu, 29 Jul 2021 16:21:28 +0000
Content-Type: text/plain; charset="UTF-8"
 by: wij - Thu, 29 Jul 2021 16:21 UTC

On Thursday, 29 July 2021 at 18:11:37 UTC+8, Malcolm McLean wrote:
> On Thursday, 29 July 2021 at 11:00:54 UTC+1, wij wrote:
> >
> > The view of real number is different from common math. which clib follows:
> > floating-point number is 'hoped' to represent real number.
> >
> Floating point number are a sufficient approximation to real numbers for most
> purposes. The exception is when doing certain types of mathematics itself.

Precisely, FP is an encoding of number in (binary) scientific notation.
Floating-point number almost represents an approximate number.
The error accumulates.

> >
> > I just think now the symbol INFINITY should be reserved, not for signaling overflow.
> >
> There's no distinction made between "overflow" and "mathematical infinity". You can
> of course say that INFINITY represents mathematical infinity in the particular
> program you are writing, but this is fraught with dangers. Really you're best using
> a package like Mathematica if you want to do maths rather than bit bashing.

I understand the changes would not happen in decades.
Like the global warming issue, someone has to emit the message.
I am not particularly worried about this.

Re: What does (real) number mean?

<87wnp93x2p.fsf@bsb.me.uk>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17677&group=comp.lang.c#17677

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: ben.use...@bsb.me.uk (Ben Bacarisse)
Newsgroups: comp.lang.c
Subject: Re: What does (real) number mean?
Date: Thu, 29 Jul 2021 17:26:54 +0100
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <87wnp93x2p.fsf@bsb.me.uk>
References: <f79b41c2-a94f-48c9-bc68-7e3aa581a2a7n@googlegroups.com>
<eb3eee1f-fff9-465a-a9bc-b5df32f848b8n@googlegroups.com>
<bbe400ff-512d-4984-a88f-1653467992abn@googlegroups.com>
<31358abf-a486-48ce-94ef-36616b20086cn@googlegroups.com>
<9cf8f398-f885-49a4-ae20-6cb3dc2eb0c6n@googlegroups.com>
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: reader02.eternal-september.org; posting-host="63f20dc46ca0f8db489d85314080024f";
logging-data="6012"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/ErxVwHJflY5mdx0/h/buclrFjH6gV9v4="
Cancel-Lock: sha1:dIXdMF0jS4gChrxG//Iesdv1NDg=
sha1:fodK3krZLNOfwXidZyz/Uf1Syi8=
X-BSB-Auth: 1.ebeca989df796bd7af77.20210729172654BST.87wnp93x2p.fsf@bsb.me.uk
 by: Ben Bacarisse - Thu, 29 Jul 2021 16:26 UTC

wij <wyniijj@gmail.com> writes:

> On Thursday, 29 July 2021 at 18:11:37 UTC+8, Malcolm McLean wrote:
>> On Thursday, 29 July 2021 at 11:00:54 UTC+1, wij wrote:
>> >
>> > The view of real number is different from common math. which clib follows:
>> > floating-point number is 'hoped' to represent real number.
>> >
>> Floating point number are a sufficient approximation to real numbers for most
>> purposes. The exception is when doing certain types of mathematics itself.
>
> Precisely, FP is an encoding of number in (binary) scientific notation.
> Floating-point number almost represents an approximate number.

It's more accurate to say that floating-point numbers are exact.

> The error accumulates.

Yes. The results of operations (and that includes input and the
conversion of source-code literals) may not be representable. Most
quality implementations will give very tight bounds on the acceptable
error for each operation. For example, most implementations will expend
considerable effort to convert a decimal literal to the nearest
representable floating point number.

--
Ben.

Re: What does (real) number mean?

<sdv73f$jji$1@dont-email.me>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=17685&group=comp.lang.c#17685

  copy link   Newsgroups: comp.lang.c
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: jameskuy...@alumni.caltech.edu (James Kuyper)
Newsgroups: comp.lang.c
Subject: Re: What does (real) number mean?
Date: Thu, 29 Jul 2021 17:37:50 -0400
Organization: A noiseless patient Spider
Lines: 54
Message-ID: <sdv73f$jji$1@dont-email.me>
References: <f79b41c2-a94f-48c9-bc68-7e3aa581a2a7n@googlegroups.com>
<eb3eee1f-fff9-465a-a9bc-b5df32f848b8n@googlegroups.com>
<bbe400ff-512d-4984-a88f-1653467992abn@googlegroups.com>
<31358abf-a486-48ce-94ef-36616b20086cn@googlegroups.com>
<9cf8f398-f885-49a4-ae20-6cb3dc2eb0c6n@googlegroups.com>
<87wnp93x2p.fsf@bsb.me.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 29 Jul 2021 21:37:52 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="7144dfa3ea24e6f3dbe5a0724f7f7a42";
logging-data="20082"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/o+9OR+aHDYSV2Gz4AvrAqx5psNDPeYXo="
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.11.0
Cancel-Lock: sha1:HD/TL252pQtoaZtVhCS9TNrqkQs=
In-Reply-To: <87wnp93x2p.fsf@bsb.me.uk>
Content-Language: en-US
 by: James Kuyper - Thu, 29 Jul 2021 21:37 UTC

On 7/29/21 12:26 PM, Ben Bacarisse wrote:
> wij <wyniijj@gmail.com> writes:
....
>> Precisely, FP is an encoding of number in (binary) scientific notation.
>> Floating-point number almost represents an approximate number.
>
> It's more accurate to say that floating-point numbers are exact.
>
>> The error accumulates.
>
> Yes. The results of operations (and that includes input and the
> conversion of source-code literals) may not be representable. Most
> quality implementations will give very tight bounds on the acceptable
> error for each operation. For example, most implementations will expend
> considerable effort to convert a decimal literal to the nearest
> representable floating point number.

In more detail, here's what the C standard has to say about it:

"The accuracy of the floating-point operations (+, -, *, /) and of the
library functions in <math.h> and <complex.h> that return floating-point
results is implementation-defined, as is the accuracy of the conversion
between floating-point internal representations and string
representations performed by the library functions in <stdio.h>,
<stdlib.h>, and <wchar.h>. The implementation may state that the
accuracy is unknown." (5.2.4.2.2p6)

That means that an implementation could be fully conforming even if it
evaluates subtraction so inaccurately that

LDBL_MAX - LDBL_MIN < LDBL_MIN - LDBL_MAX

evaluates as "true", so long as it's documentation doesn't claim to
provide any higher degree of accuracy, which would essentially render
floating point math useless. The C standard recommends, and in some
contexts, requires that conversions be correctly rounded, which means:

"representation in the result format that is nearest in value, subject
to the current rounding mode, to what the result would be given
unlimited range and precision" (3.9)

which is pretty much the strongest possible requirement, but that is
nearly useless unless floating point arithmetic also has fairly strong
accuracy requirements.

However, when __STDC_IEC_559__ is pre-#defined by the implementation,
the much stronger requirements of IEC 60559 (== ANSI/IEEE 754) apply,
and in that case floating point math is very useful (though care is
still required when using it).

That's why Ben referred to "quality implementations" - such
implementations will provide accuracy much better than the minimum
allowed by the C standard.

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor