473,774 Members | 2,147 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Re: Standing on the Giants shoulders... :-)

On May 30, 10:18 am, James Kanze <james.ka...@gm ail.comwrote:
On May 30, 6:00 am, "kwikius" <a...@servocomm .freeserve.co.u kwrote:
quan
http://tinyurl.com/5lxb3s
std
http://tinyurl.com/6k9b7f
hmm... something smells a bit whiffy ..

Sorry, but I don't follow you. What's the relationship between
the two?
The duration type is pretty much of an exact replica of the quan
quantity.

But.....

From the text the impression one gets is that the design is basically
that of Jeff Garland boost date time lib, with some vague reference
to Walter Brown, presumably SI units library and implementation by
Howard Hinnant.

I believe Walter Brown used compile time rational numbers [1] in
SIUnits, as did Barton & Nackman, but they only used compile time
rationals for dimensional analysis, not conversion factors (meter to
millimeters etc).
The original use of compile time rationals for the units was AFAIK my
pqs library, the forerunner of my quan library in the above link.
(Originally pqs used 2 separate compile time integers, but it was
Brandon Forehand that pointed out that they were in fact acting as a
rational number, and pqs was subsequently modified accordingly).
In fact Mr Garland did use conversion factors in his boost date time
lib, but used runtime scaling (in an explicit ctor at least in
boost_1.33.0), all values were kept internally in milliseconds in a
base class.

Compared with quans method this approach has both a poor range and
loss of precision due to the initial division.
As far as Mr Brown is concerned, he appears until very recently to
have found *problematic*, treating quantities with different
conversion factors as different types (rather than using one type and
doing a runtime scaling, the SIUnits approach).

See wg21 n2526 section 4.1, 4.2 4.3 etc. (Quite a funny read
actually :-))

My guess is that he has been swung around, because in use it is
obvious that the approach used by quan is much superior... the
approach in second link. sorry SIUnits.

I spent a large amount of time working out and arguing for the
approach these guys seem to be taking the credit for between 2003-2007
on boost.org amidst a large amount of naive criticism, and where Mr
Garland is a moderator so IOW he must be familiar with my work. Mr
Garland eventually succeeded in initiating a flame war on boost.org
during middle of which he informed me that he was singling my posts
out for moderation, akin to tieing someones hands behind their back
and slapping them about. At which point I left.
.... hence the source of the smell.

regards
Andy Little


note 1
(Unfortunately I wrongly attributed the origin of compile time
rational to Matthias Schabel in quan-0_2_0), but compile time
rationals appears AFAIK in SIUnits and a physical quantities lib,
ebf_units by Eric Ford around 2003, shortly before my earliset pqs
libray, predecessor to quan.)





Jun 27 '08 #1
2 1828
James Kanze wrote:
On Jun 1, 4:01 pm, kwikius <a...@servocomm .freeserve.co.u kwrote:
>On Jun 1, 10:34 am, James Kanze <james.ka...@gm ail.comwrote:
On Jun 1, 4:40 am, kwikius <a...@servocomm .freeserve.co.u kwrote:
><...>
What brotherhood is that? I'm certainly not involved in any way
with Boost (although I like a lot---but not everything---of what
they do). And in the standards committee, my activity is mostly
in the language section, and except for threading and garbage
collection, exclusively involved with improving existing
elements. Of the authors, I've meant Howard once, Walter and I
are old sparring partners (because I rather think that D is a
waste of time), and I've never even heard of the other two.
>err.. hmm... Walter E. Brown, Fermilab, author of SIUnits ...
not Walter Bright, C++ innovator and author of D, nor even
Walter Banks.. extender of C, Bytecraft.

Oops.
I actually now just find this whole business very amusing,
well ... and somewhat sad. The truth is the truth and well
documented over a period of some years for any one that cares
to look.
You mean like the proposals for Units in Algol.
>That sounds like a lot of fun :-) ... but Without a link to
the details its FUD and handwaving, so... Care to provide a
link to these proposals?

I'm afraid the Web wasn't used much back in the early days of
Algol.
An ordinary reference like Author, Year, Title, ... would be cool, too.
Then, one would have a chance to find it in a library.

[...]
>Now there seem to be peple trying to slyly give the impression
that its all their idea,

Actually, you seem to be the only one claiming its their idea.
All of the others seem to consider it as more or less usual
practice.
I wonder, whether it is all that clear what "it" is. I don't think that Mr
Little claims to be the first to use converions factors to deal with
different units. There must be something about the internals of his quan
library that he thinks is originall, and while I am not sure what _it_ is,
I suspect it might have escaped you too. Sometimes, thinks look
superficially similar to something well known and the cute trick and twist,
which is actually new, is somewhat hidden.

A guess from elsethread is that "compile time rationals" (whatever that is)
might be the new idea of Mr Little. I am not familiar with Algol, but I
wonder whether it supports templates to the extend necessary to realize
compile time rationals (which probably would have to entail computing GCDs
at compile time).
Best

Kai-Uwe Bux

Jun 27 '08 #2
On Jun 1, 9:39 pm, Kai-Uwe Bux <jkherci...@gmx .netwrote:

<...>
I wonder, whether it is all that clear what "it" is. I don't think that Mr
Little claims to be the first to use converions factors to deal with
different units. There must be something about the internals of his quan
library that he thinks is originall, and while I am not sure what _it_ is,
At the end of the following post of mine on clc++ is some code showing
a highly simplified version of the techniques in quan, this just deals
with simple integer exponents, but gives a flavour...

http://tinyurl.com/5qvnzt

.... but quan actually uses rationals ( a rational exponent and a
rational multiplier per unit (standards proposal can only deal with
multiplier part) where you can have much more flexibility in scaling
values between quantities in different units
Note that the version used in quan-0_2_0 also performs optimised calcs
between scaling factors during compile time to do as much of the calc
in conversions as possible at compiletime not runtime:

http://tinyurl.com/6nuuet
This is the same approach used in the standard proposal, except that
quan can deal with all types of quantities(incl uding non si ones), not
just time, multiply add, divide, pow, etc with huge range, speed and
accuracy. (AFAICS "duration" type in standards proposal only uses a
multiplier, not exponent too as in quan... range in quan is huge
compared, with no cost in runtime space, speed or accuracy... highly
desirable for engineering, aerospace etc, etc.)

regards
Andy Little

Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
2210
by: Larry Herbinaux | last post by:
I'm having issues with garbage collection with my long-standing service process. If you could review and point me in the right direction it would be of great help. If there are any helpful documents that you could point me to help me control the GC, then that would be great also. The .Net GC does not cleanup memory of our service process unless it is forced to by another process that hogs memory. · GC Algorithm - This is an issue...
3
1974
NewYorker
by: NewYorker | last post by:
Hello brothers and sisters, Please help me complete this program and get the output shown below. Here is all I have ___________________________________________________________ This homework involves reading sentences from a file and determining the makeup of the sentences, words and characters. 1. First, you will read in the sentences with the function void readSentences(string sentences, int &numSentences)
4
1480
bartonc
by: bartonc | last post by:
Currently, a Google search for http://www.google.com/search?hl=en&q=python+forum brings up the Python Forum on TheScripts.com in 10th place. I have found that simply posting a google link tends to raise that standing. Perhaps clicking the link will help, too. So, all faithful TheScripts Pythoneers, help raise our Google search standing. Thanks.
1
1068
by: mrjaune | last post by:
Hello Everyone, I want to create an application to do the standing of a race. First part, for each pilot I want to enter: his name, his number, his team, the number of points. Second part, when I click the button 'standing' the application make the standing from the pilot who have the most point to the pilot who have the less point. Third part, then you can print the list.
3
1084
by: mrjaune | last post by:
Hi, I'm quite a newbie and I want create an application to generate the standing of a race. 1 - You enter the data relating to the racers: Name Number Points in round 1 Points in round 2 2- The app calculates the total of points for each racer.
1
1030
by: kwikius | last post by:
quan http://tinyurl.com/5lxb3s std http://tinyurl.com/6k9b7f hmm... something smells a bit whiffy ..
11
224
by: James Kanze | last post by:
On May 30, 8:02 pm, kwikius <a...@servocomm.freeserve.co.ukwrote: The duration type is pretty much a simple example of a classical "units" type. The first time I saw something along those lines was at least 15 years ago. It's hardly a new idea. (I actually suspect that it's been "invented" independently many times.)
3
1780
by: thesinnerishere | last post by:
this is regarding the last number standing problem. it requires the number in an array to be extracted at a specified position . then the array needs to traverse through the right position of the extracted number until there's the last number in the array. that number is the answer. for eg. if the specified position is 2 then in the array 1,2,3,4,5 it should go this way 1,3,4,5 1,3,5
4
2104
by: Michael R | last post by:
Hi everyone. For a coding of something which seem too long to explain, I need to find out, by .recordset or any other way, whether or not I (the user) am standing on the new record row in a form. I've checked .EOF, but it gives me 'False'. I also have checked .AbsolutePosition but it gives me the record number of the last record I was standing on. Maybe there's some other way, or other property of .recordset I'm not aware about that...
0
1495
by: muddasirmunir | last post by:
I have computer CPU Casing in standing style , I want to know if i put my CPU in lying can it affect some things/functions of my computer. I know my cd rom will have some problem as the cd my not sit properly on cd rom but as i donot use it so it wont be any problme but can it create some other problems.
0
9621
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10267
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9914
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6717
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5355
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4012
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3611
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.