Thursday, July 13, 2017

Digest for comp.lang.c++@googlegroups.com - 25 updates in 7 topics

Thomas Jahns <jahns@idontlikespam.dkrz.de>: Jul 13 10:14AM +0200

On 07/13/17 00:47, Lynn McGuire wrote:
 
> https://randomascii.wordpress.com/2017/06/19/sometimes-floating-point-math-is-perfect/
 
> Interesting. We moved to 64 bit doubles a couple of decades ago and have never
> regretted it.
 
Not really applicable in the comp.lang.fortran forum: Fortran leaves enough
parts of REAL arithmetic unspecified that compilers are sufficiently free to
interpretations of code that give results different from the IEEE
specifications. An example is that the Intel compiler (when optimizing at all)
will compute expressions at compile-time different from run-time.
 
C and C++ have tighter rules, but that effectively also creates less opportunity
for optimizations.
 
Thomas
bitrex <bitrex@de.lete.earthlink.net>: Jul 13 08:23AM -0400

On 07/12/2017 06:47 PM, Lynn McGuire wrote:
 
> Interesting. We moved to 64 bit doubles a couple of decades ago and
> have never regretted it.
 
> Lynn
 
"If the two constants being added had been exact then there would only
have been one rounding in the calculation and the result would have
matched the literal on the right-hand side."
 
What does "exact" mean in this context? How is writing 98432341293.375 +
0.000244140625 more "exact" than 0.2 + 0.3?
"Fred.Zwarts" <F.Zwarts@KVI.nl>: Jul 13 03:51PM +0200

"bitrex" schreef in bericht news:YCJ9B.187981$qL3.75804@fx34.iad...
>literal on the right-hand side."
 
>What does "exact" mean in this context? How is writing 98432341293.375 +
>0.000244140625 more "exact" than 0.2 + 0.3?
 
Exact means that the decimal representation can be converted exactly to a
binary representation.
Since 10 can be divided by 5, 1/5 can be represented exactly in decimal
notation (0.2).
But since 2 cannot be divided by 5, 1/5 cannot be represented exactly in
binary notation.
(Just as 1/3 cannot be represented exactly by a decimal notation (because 3
is not a divisor of 10) but needs rounding: 0.3333333333\.)
So, 0.2 cannot be represented exactly by a binary floating point number.
0.000244140625, however, can be represented exactly as a binary floating
point number.
Ben Bacarisse <ben.usenet@bsb.me.uk>: Jul 13 03:04PM +0100

> have been one rounding in the calculation and the result would have
> matched the literal on the right-hand side."
 
> What does "exact" mean in this context?
 
In this context it means... er... exact -- without any error.
 
> How is writing 98432341293.375 + 0.000244140625 more "exact" than 0.2
> + 0.3?
 
Neither the quoted paragraph not the blog post use the term "more
exact". What's more the blog post does not compare 98432341293.375 +
0.000244140625 with 0.2 + 0.3, but with 0.1 + 0.3.
 
98432341293.375 is binary 1011011101011000001100101010100101101.011.
This can be represented exactly (without error) in a C double and, if
the C implementation conforms to the IEEE floating-point
recommendations, it will be exactly represented. Likewise,
0.000244140625 is exactly .000000000001 and the rules of IEEE arithmetic
say that the sum must be rounded to the nearest (binary) digit. In
fact, the sum can be represented exactly in a C double so "rounding to
the nearest binary digit" means, in the case, giving the exact answer.
 
With 0.1 + 0.2 there are three places where accuracy is lost. 0.1 can
not be represented exactly in a binary double and neither can 0.2. Both
will be represented by the nearest possible floating-point number, but
neither is exact. Finally, the sum of those two closest-but-not-quite
numbers can not be exactly represented either, giving a third loss of
accuracy.
 
I leave your example, 0.2 + 0.3 for you to analyse yourself.
 
--
Ben.
bitrex <bitrex@de.lete.earthlink.net>: Jul 13 10:10AM -0400

On 07/13/2017 10:04 AM, Ben Bacarisse wrote:
 
> exact". What's more the blog post does not compare 98432341293.375 +
> 0.000244140625 with 0.2 + 0.3, but with 0.1 + 0.3.
 
> 98432341293.375 is binary 1011011101011000001100101010100101101.011.
 
Ah, naturally. Thanks for clearing that up
bitrex <bitrex@de.lete.earthlink.net>: Jul 13 10:16AM -0400

On 07/13/2017 09:51 AM, Fred.Zwarts wrote:
 
> So, 0.2 cannot be represented exactly by a binary floating point number.
> 0.000244140625, however, can be represented exactly as a binary floating
> point number.
 
 
I thought it might be something like that; unfortunately my ability to
mentally do decimal to binary conversions on the fly tops out around 900
million
Siri Cruise <chine.bleu@yahoo.com>: Jul 13 08:08AM -0700

In article <YCJ9B.187981$qL3.75804@fx34.iad>,
> matched the literal on the right-hand side."
 
> What does "exact" mean in this context? How is writing 98432341293.375 +
> 0.000244140625 more "exact" than 0.2 + 0.3?
 
Any real number of the form m*2^n, integers m and n, can be exactly represented
in radix two in log2 m + log2 n digits, the near universal radix of computer
numbers. These numbers are closed under addition, subtraction, multiplication
but not division.
 
It can be represented exactly as computer real number if the representation has
at least log2 m fraction bits and log2 n exponent bits.
 
0.2 = 2*10^-1 = 2*2^-1*5^-1 = (1*2^0) / (5*2^0), and this division is not
closed. Same for 0.3.
 
--
:-<> Siri Seal of Disavowal #000-001. Disavowed. Denied. Deleted. @
'I desire mercy, not sacrifice.' /|\
Free the Amos Yee one. This post / \
Yeah, too bad about your so-called life. Ha-ha. insults Islam. Mohammed
bitrex <bitrex@de.lete.earthlink.net>: Jul 13 12:50PM -0400

On 07/13/2017 11:08 AM, Siri Cruise wrote:
 
> at least log2 m fraction bits and log2 n exponent bits.
 
> 0.2 = 2*10^-1 = 2*2^-1*5^-1 = (1*2^0) / (5*2^0), and this division is not
> closed. Same for 0.3.
 
Thanks, I was unsure because IIRC it wasn't stated explicitly in the
article that just the standard properties of floating point
representations of binary numbers was what the author was talking about,
and not something specific to IEEE-754 (which I'm not terribly familiar
with.) I guess I thought that paragraph (and example numbers the author
used) wasn't particularly well-worded, but my educational background
isn't in computer science.
Rups Sivo <jaysivo@gmail.com>: Jul 12 07:40PM -0700

On Tuesday, July 11, 2017 at 12:40:38 AM UTC+12, Rick C. Hodgin wrote:
> private email if you feel more comfortable.
 
> Thank you,
> Rick C. Hodgin
 
Jesus the Christ,
God embodied in human flesh, lived a man.. tempted but never sinned, crucified, buried and rose up in 3 days. As the spirit he lives. Waiting for anyone to open the doors of their heart, their innermost being to dwell, make home and change a man. Its a matter of choice.. but then choices are hard to make if there is a very strong opposing force at play.
 
Keep on keeping on Rick
Christian Gollwitzer <auriocus@gmx.de>: Jul 13 07:26AM +0200

Am 12.07.17 um 23:48 schrieb Chris M. Thomasson:
> unwarranted assault off, then you blame me, and say the demonic forces
> are casting their will through my mind.
 
> Wow. Why do you do that to others? Wow.
 
It could be https://en.wikipedia.org/wiki/Religious_delusion
 
You can never convince him with arguments. Every argument contrary to
his belief will be dismissed as "coming from the devil"
 
Christian
Ian Collins <ian-news@hotmail.com>: Jul 12 05:18PM +1200

On 07/12/17 10:12 AM, Rick C. Hodgin wrote:
>> things at you.
 
> Yes. And they also ban me from places where there is moderation.
 
> But why do they ban me?
 
They ban you because you are off-topic and are too pigheaded or
narcissistic to realise that off-topic posting is rude and disrespectful.
 
What you believe is irrelevant, rules are there for a reason.
 
--
Ian
cross@spitfire.i.gajendra.net (Dan Cross): Jul 13 02:28PM

In article <ok6587$q7m$1@dont-email.me>,
>unwarranted assault off, then you blame me, and say the demonic forces
>are casting their will through my mind.
 
>Wow. Why do you do that to others? Wow.
 
Please please please stop feeding this troll. Those of us who have
kill-filed Rick would really appreciate it. Thanks!
 
- Dan C.
bitrex <bitrex@de.lete.earthlink.net>: Jul 13 10:49AM -0400

On 07/12/2017 01:02 AM, Reinhardt Behm wrote:
 
> It is not only a possibility. These are real observations of real people.
> People lied to me people betrayed me. Then they prayed to their imagined god
> and were "forgiven". Then they continued lying and betraying.
 
Here's an unfortunate piece of reality for ya: you will be deceived,
lied to, abandoned, and betrayed by other people day in and day out
until you fuckin' die!
 
And that goes for everyone, not just you. So the question is - if that
truth is a natural part of existence then why do you care so much. That
such things naturally happen is sort of like weather. Do you get upset
at rainy days? Does the fact that it rains sometimes personally offend you?
 
I'm just saying I feel this is an important question for even
non-religious people to ask themselves because it's perfectly possible
to engineer one's life so you don't _have_ to count the cost so much.
 
If it's raining then grab an umbrella and play on.
Reinhardt Behm <rbehm@hushmail.com>: Jul 12 01:02PM +0800

AT Tuesday 11 July 2017 22:53, Rick C. Hodgin wrote:
 
> have come to believe in Jesus Christ are not crazy, but have found
> something you do not yet know.
 
> If you are being honest, does that possibility truly exist?
 
It is not only a possibility. These are real observations of real people.
People lied to me people betrayed me. Then they prayed to their imagined god
and were "forgiven". Then they continued lying and betraying.
This was also an observation of a friend who came as a new teacher into a
school in a mostly catholic neighborhood. He told me they lie and steal the
whole week on Sunday they go to church, confess and are forgiven. The next
week they continue the same way.
My observation with religious people is that they unconsciously notice that
this religion is all a lie and does not comply with reality. This continuous
lying to themselves make them behave the same against others.
 
Fortunately I live now in a country (TW) where these believers in a single
god are a total minority. But still they are trying to force their believe
system on the whole society, and complain about being suppressed if they do
not have success.
The same type of continuous lie.
 
--
Reinhardt
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 13 08:10AM -0700

On Thursday, July 13, 2017 at 10:50:08 AM UTC-4, bitrex wrote:
> Here's an unfortunate piece of reality for ya: you will be deceived,
> lied to, abandoned, and betrayed by other people day in and day out
> until you .. die!
 
That is the natural way of the world because of sin. When a person
comes to Jesus and asks Him to forgive their sin, their sin is taken
physically away from them, as if a dirty jacket was removed, so that
what remains is sin-free in God's sight, and our own spirit nature
is born again into life.
 
From that point forward, the original life that existed on this
planet in the form of that person is changed. The old man literally
dies, and the man has been born.
 
Same outward appearance bodily, but the manners and movements and
thoughts and deeds of that same body will forever be altered.
 
God is offering us a way to be free from the hatred and death and
disease of this world. We still remain here in these bodies for
a time, but it is only so we can reach others and grow in knowledge
and service to His Kingdom here on Earth, before leaving this Earth
forever, to be with Him in Heaven forever.
 
-----
My teachings on these issues are of that kind: This world is fallen
in sin. Everything here is corrupt. What Jesus offers us is a way
out of that corruption, and a way back to righteousness, holiness,
and eternal life, for we are literal gods (lower-case "G") made in
the image and likeness of God Himself. We are His children if we
will be redeemed.
 
Thank you,
Rick C. Hodgin
 
PS - I hope you can see why this is so important to know. There is
a great and powerful enemy deceiving the entire world. But
the truth is greater, and it is brought to you by the men and
women of God who point you to Jesus Christ, to repentance, to
salvation, to eternal life.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 13 08:22AM -0700

On Thursday, July 13, 2017 at 11:10:50 AM UTC-4, Rick C. Hodgin wrote:
> and eternal life, for we are literal gods (lower-case "G") made in
> the image and likeness of God Himself. We are His children if we
> will be redeemed.
 
To give the Biblical foundation for this:
 
http://biblehub.com/kjv/john/10.htm
 
34 Jesus answered them, Is it not written in your law, I said,
Ye are gods?
 
The verse He refers to is:
 
http://biblehub.com/kjv/psalms/82.htm
 
6 I have said, Ye are gods; and all of you are children of
the most High.
 
The Old Testament Hebrew word used there for "gods" is Strong's 430:
 
http://biblehub.com/hebrew/430.htm
 
And the New Testament Greek word used by Jesus for "gods" is Strong's
2316:
 
http://biblehub.com/greek/2316.htm
 
-----
We are taught in scripture that we have the right to become the sons
of God through Jesus:
 
http://biblehub.com/john/1-12.htm
 
12 But as many as received him, to them gave he power to become
the sons of God, even to them that believe on his name:
 
-----
 
Have you ever had anyone teach you that you are a god? Or are you
taught that you are worm food?
 
The enemy of God, Satan, teaches us all manner of false things in
this world. You can pretty much rest assured that if it's a popular
teaching, that it's 100% off from the real way. An example: try
evolution. The real truth is creation. Satan says evolution.
Creation ascribes to God. Evolution ascribes to natural processes
and in no way to God.
 
Satan's M.O. is to destroy God. He wants everything about God to
be rendered foolish by his own teachings. But God is true, and
Satan is a liar (http://biblehub.com/john/8-44.htm).
 
-----
These things I teach you are literally God's own words conveyed in
this format for YOU. It is God reaching out to YOU through me. It
is His great love for you shining into the darkness of your current
life.
 
You know you struggle. You know there is hate in this world. And
you long within yourself for something more. This is that something.
God is giving you what you're asking for. He's pointing you the way
to total victory in His Son.
 
Come to Him. Even come with words like this, "God, I don't know if
you are real, or if Jesus is real, but if you are, and if He is, and
if there is a real afterlife in eternity, then I do want to honestly
know the truth about it. I want to know the truth so I can make an
informed and right decision. And if you are real, I ask you to help
me."
 
If you can muster up that degree of truth-seeking ... God will do
the rest.
 
Thank you,
Rick C. Hodgin
bitrex <bitrex@de.lete.earthlink.net>: Jul 13 08:12AM -0400

Hi, I'm still working on my own little "game engine" as a C++ hobby
project. I'm wondering about some general OOP design issues and hope
maybe someone can give a bit of advice on a sound design principle for
the following situation.
 
I have an abstract pure-virtual class called something like
DisplayObject, which currently can be further subclassed into child
classes like "DisplayObject2D", "DisplayObject3D", etc.
 
The interface is fairly simple, for example there's a method which
returns a std::vector of std::weak_ptrs to the sprites for the rendering
thread to hang onto in a vector, and a "render" method to be overridden
for the rendering thread to call.
 
There's a handle class called say "GameObject" which composites various
DisplayObjects and will also composite the classes which the logic code
operates on.
 
So I'm also using some CPU-based visual effects which inherit from
AbstractDisplayObject's interface, but this has lead me to three levels
of inheritance; say AbstractDisplayObject -> EffectObject ->
ConcreteEffectObject where EffectObject also has some virtual methods
for _its_ child classes to override and...this is getting hairy and sort
of brittle already.
 
Someone recommended using the factory method/paradigm whatever to set up
an interface where a factory can just generate any kind of
AbstractDisplayObject that's been defined by the user on-the-fly
depending on what sort of parameters are passed into the factory
function, and return a reference that can then be held by whatever
container can hold AbstractDisplaObject references. So I don't have to
resort to deeper levels of inheritance.
 
Any tips on how to implement this in this situation would be great
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 12 07:17PM -0700

On Wednesday, July 12, 2017 at 3:59:36 PM UTC-4, Rick C. Hodgin wrote:
> unending joy. And the path you're on today ends in a lake of
> fiery torment that never ebbs, never dries out, never calms down.
> It rages in fullest flame forever.
 
Here's a visualization of this (begins at 8:01):
 
https://www.youtube.com/watch?v=zO8t2L9TcAU&t=8m1s
 
Thank you,
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 13 04:46AM -0700

On Wednesday, July 12, 2017 at 3:59:36 PM UTC-4, Rick C. Hodgin wrote:
> unending joy. And the path you're on today ends in a lake of
> fiery torment that never ebbs, never dries out, never calms down.
> It rages in fullest flame forever.
 
Some people would wonder: Why would Rick write this? God is
supposed to be all about love. How could Rick be so cruel and
pervert God's love into some form of hate? How could Rick be
so hateful to turn God's love into something else?
 
God is love. But He is also Holy. And He doesn't have a future
in mind where sin will abide. What will come in the hereafter is
described in the Bible. It is Heaven revealed to us, and God's
own Holy Temple. God has set it aside for Himself in eternity,
and He has purposed to keep all wrongness apart from it:
 
http://biblehub.com/kjv/revelation/21.htm
 
27 And there shall in no wise enter into it any thing that
defileth, neither whatsoever worketh abomination, or
maketh a lie: but they which are written in the Lamb's
book of life.
 
God examines the hearts and minds of each person and He knows
each person's true state. He knows who is His, and who is not
His, and who will be His one day, and who will never be His one
day. He doesn't impose upon people, casting them into these
roles, but each person is revealed by who they are, and what
choices they will make.
 
For all (literally all) who will seek the truth, God reaches
in to their heart and flips the invisible switches necessary
to come to salvation. Until that time we remain dead in sin,
dead in our transgressions, wholly condemned and on our way
to Hell already. But when God reaches in to a person's life,
He begins a work within them that He Himself is able to complete.
 
No act of salvation is by man's power or authority. No thing a
person is able to do is able to save them. All a person can do
is reveal themselves before God, indicating for the permanent
record (all of those books written down in Heaven) who you are,
and what you are in pursuit of. God sees past facades and outer
shells, and He looks straight through to the heart.
 
-----
Without knowing who God is, your current sin condition, and the
judgment that is coming ... how can you place value on that which
Jesus did at the cross?
 
My goals are to teach you the fundamentals about God, about sin,
about judgment and condemnation for sin in Hell, but even more
importantly about God's love and grace for you, in that God has
made a way out of that death-sentence in Hell by sending His own
Son to die at the cross in your place.
 
I'm teaching you about the love of God, the purposed heart of
God that He will keep His eternal House clean, and that He wants
you to be a part of His Kingdom. He teaches you this Himself
through men and women like me who are, as accurately as we're
able, in as many diverse ways as we're able, teaching you His
words, about Him, about His Son, and also about yourselves.
 
-----
I pray you will come to see yourself as you are. I pray you will
come to Jesus and ask Him to change you, to forgive your sin and
take you off the path you're on today, and set you on the right
path of light and love and peace and joy that leads to His eternal
Kingdom of Heaven's paradise.
 
God calls out to you. Will you answer?
 
Thank you,
Rick C. Hodgin
bitrex <bitrex@de.lete.earthlink.net>: Jul 13 07:47AM -0400

On 07/12/2017 03:59 PM, Rick C. Hodgin wrote:
> That stuff from your past?
> Your youth?
> The early sin you did in your wild days?
 
I am certainly guilty and will gladly read from my own set of books if
that's OK - it's probably nearly as big.
bitrex <bitrex@de.lete.earthlink.net>: Jul 13 07:57AM -0400

On 07/13/2017 07:46 AM, Rick C. Hodgin wrote:
 
> God calls out to you. Will you answer?
 
> Thank you,
> Rick C. Hodgin
 
I've put in my request, but I hear God receives a lot of applications.
 
That's just the first part.
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 13 05:06AM -0700

On Thursday, July 13, 2017 at 7:57:37 AM UTC-4, bitrex wrote:
> > God calls out to you. Will you answer?
 
> I've put in my request, but I hear God receives a lot of applications.
> That's just the first part.
 
God is omnipresent, able to hear everybody and communicate with
each of us as though we were the only and sole focus in His entire
existence. It's the most intimate and close personal relationship
you'll ever have with anyone ... even moreso than you spouse
because He is spirit, and is there in a way that's different than
someone who's there with you in the flesh (physically, side-by-
side, whereas God actually dwells within you spiritually).
 
Thank you,
Rick C. Hodgin
"Rick C. Hodgin" <rick.c.hodgin@gmail.com>: Jul 13 03:56AM -0700

Intel told me they keep records back to version 6.0. My compiler
was version 4.5 IIRC, and they were unable to locate a sales record.
 
Thank you,
Rick C. Hodgin
Christiano <christiano@engineer.com>: Jul 13 07:49AM -0300

On 07/07/17 08:08, Alf P. Steinbach wrote:
> It so happens that I don't have any Apple equipment
 
When I had a similar problem, I bought 1 month of VPS Mac here:
http://hostmyapple.com/
 
And I used the free program RealVNC to access the VPS (and SSH as well).
killet@killetsoft.de: Jul 12 10:48PM -0700

Hi developers,
 
who develops programs with geodetic functionality like coordinate transformations, datum shifts or distance calculations, can use geodetic functions from my GeoDLL. The Dynamic Link Library can easily be used with most of the modern programming languages like C, C++, C#, Basic, Delphi, Pascal, Java, Fortran, Visual-Objects, MS-Office and others to add geodetic functionality to own applications. For many programming languages ​Interfaces and Examples are available.
 
GeoDLL allows developers to embed thousands of preadjusted, precise coordinate transformations and geodetic datum shifts into their individual geoinformatics software. GeoDLL contains many geomatics tools for GIS development, such as creating Helmert and Molodensky parameters, NTv2 and HARN grid shifts, INSPIRE and EPSG support, digital elevation models, distance and time zone calculations and the ability to use custom best fit transformation parameters.
 
The DLL is very fast, save and compact thanks to the consistent development in C++ with Microsoft Visual Studio. The geodetic functions are available in 32bit and 64bit architecture. All functions are prepared for multithreading and server operating.
 
You find a free downloadable test version on http://www.killetsoft.de/p_gdla_e.htm
Notes about the NTv2 support can be found here: http://www.killetsoft.de/p_gdln_e.htm
Report on the quality of the coordinate transformations: http://www.killetsoft.de/t_1705_e.htm
 
Fred
Email: info_at_killetsoft.de
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: