On Mon, 28 Jan 2019, a...@aavani.net wrote:
Hi,
I am looking for a version of Format function that works with
WideStrings. One way to implement this is to use something like the
folllowing:
function GetNames(const FirstName, LastName: WideString; ID: Integer):
WideString;
begin
Resu
Hi,
I am looking for a version of Format function that works with
WideStrings. One way to implement this is to use something like the
folllowing:
function GetNames(const FirstName, LastName: WideString; ID: Integer):
WideString;
begin
Result := ReadWideString(Format('%d %s %s', [ID,
Wi
Daniël Mantione wrote:
The difference is of scientific meaning. If there were no negative zero,
the precision around zero would be halved.
While true, its precision would be the same as the precision "around"
all other numbers.
0 = -0.5 .. 0.4
1 = 0.5 .. 1.4
2 = 1.5 .. 2.4 etc...
Micha
On Thu, Oct 12, 2006 at 03:24:14PM +0200, Florian Klaempfl wrote:
> Andrea Mauri wrote:
> > Jonas Maebe wrote:
> >>
> >> Not only that, but -0.000 is different from 0.000 (at least for the fpu)
> >>
> >>
> >> Jonas
> > In a mathematical way of view I think that -0.000 has no meaning.
It does it me
TED]>
To: "FPC developers' list"
Sent: Thursday, October 12, 2006 5:51 PM
Subject: Re[3]: [fpc-devel] format function
Why do you think that scientific notation is used by default?
I personally prefer "-0.000" in this case.
It's just a personal preference.
A
> Why do you think that scientific notation is used by default?
>> I personally prefer "-0.000" in this case.
It's just a personal preference.
A weak argument:
If you write a program "grandma" should use, you can always add an extra check
if she complains (and it will be only one of the many "ex
Jonas Maebe wrote:
examples when you answered with "Like?". I therefore gave a link to a
wikipedia article which shows that the sign matters e.g. when dividing
by zero (positive or negative infinity), and the article also gives some
Well I meant a "real practical" difference, not something at
Op Thu, 12 Oct 2006, schreef ???:
> "Format" primarily produces strings for users, not for programmers.
Why do you think that scientific notation is used by default?
Daniël___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://
On 12 okt 2006, at 16:31, Micha Nelissen wrote:
Michael Van Canneyt wrote:
Like ?
http://en.wikipedia.org/wiki/Negative_zero
Jonas being succinct as ever :)
And not answering the question ... sigh. As shown there, you never
notice the difference in result.
I don't understand what you m
> http://en.wikipedia.org/wiki/Negative_zero
> Jonas
Nice link: "In science, −0 may be used to denote a quantity which is less
than zero, but which is too small in magnitude to be rounded down to −1."
"Format" primarily produces strings for users, not for programmers.
___
Op Thu, 12 Oct 2006, schreef ???:
> > representable in an exact way on any IEEE standard-compliant fpu. The
>
> Of course. But the result of "format" is user-oriented. User is not supposed
> to know about negative zero, denormal numbers, negative infinity and the
> whole IEEE 7
Michael Van Canneyt wrote:
Like ?
http://en.wikipedia.org/wiki/Negative_zero
Jonas being succinct as ever :)
And not answering the question ... sigh. As shown there, you never
notice the difference in result.
Micha
___
fpc-devel maillist - fpc
On Thu, 12 Oct 2006, Jonas Maebe wrote:
>
> On 12 okt 2006, at 15:46, Micha Nelissen wrote:
>
> >Jonas Maebe wrote:
> > >can still be one (meaning that it's a negative zero). And for some fpu
> > >calculations this even matters.
> >
> >Like ?
>
> http://en.wikipedia.org/wiki/Negative_zero
he
On 12 okt 2006, at 15:46, Micha Nelissen wrote:
Jonas Maebe wrote:
can still be one (meaning that it's a negative zero). And for some
fpu calculations this even matters.
Like ?
http://en.wikipedia.org/wiki/Negative_zero
Jonas
___
fpc-devel mai
> representable in an exact way on any IEEE standard-compliant fpu. The
Of course. But the result of "format" is user-oriented. User is not supposed to
know about negative zero, denormal numbers, negative infinity and the whole
IEEE 754.
If the user is supposed to understand that "-0.000" mea
On Thursday 12 October 2006 13:46, Micha Nelissen wrote:
> Jonas Maebe wrote:
> > can still be one (meaning that it's a negative zero). And for some
> > fpu calculations this even matters.
>
> Like ?
Divide by signed zero. That decides if the result is positive or
negative infinity. :D
Vinzent.
velopers' list"
Sent: Thursday, October 12, 2006 3:46 PM
Subject: Re: Re[2]: [fpc-devel] format function
On 12 okt 2006, at 15:41, Пётр Косаревский wrote:
In the othe case, if the user is supposed to understand, that he looks at
some representation of binary representation of a re
Jonas Maebe wrote:
can still be one (meaning that it's a negative zero). And for some fpu
calculations this even matters.
Like ?
Micha
___
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
On 12 okt 2006, at 15:41, Пётр Косаревский wrote:
In the othe case, if the user is supposed to understand, that he
looks at some representation of binary representation of a real
number, "-0.000" obviously means "little negative number".
No, it means the value 0, but with a negative sign.
> >> Not only that, but -0.000 is different from 0.000 (at least for the fpu)
> >> Jonas
> > In a mathematical way of view I think that -0.000 has no meaning.
> Well, despite the fact that -0.000 is probably indeed wrong in this case, a
> mathematical view is often wrong when using an fpu :)
> > If
Andrea Mauri wrote:
> Jonas Maebe wrote:
>>
>> Not only that, but -0.000 is different from 0.000 (at least for the fpu)
>>
>>
>> Jonas
> In a mathematical way of view I think that -0.000 has no meaning.
Well, despite the fact that -0.000 is probably indeed wrong in this case, a
mathematical view i
Jonas Maebe wrote:
Not only that, but -0.000 is different from 0.000 (at least for the fpu)
Jonas
In a mathematical way of view I think that -0.000 has no meaning.
If I round something and the resulting value is zero, well zero is zero.
Not +0 or -0.
a.
_
Michael Van Canneyt wrote:
Because your number is negative... The original number is taken to decide
whether it should put the - sign or not. What does delphi do ?
Michael.
___
Delphi gives 0.000 as result.
a.
__
On 12 okt 2006, at 14:22, Michael Van Canneyt wrote:
I noticed a strange behavior of the format function. I'm not sure
it can be
considered as a bug.
If I use
format('%.3f', [-0.0001])
the resulting string is
-0.000
and not
0.000
Why?
Because your number is negative... The original number i
On Thu, 12 Oct 2006, Andrea Mauri wrote:
> Dear all,
> this is my first mail to this mailing list, I'm not sure this is the correct
> one to post this topic.
> I noticed a strange behavior of the format function. I'm not sure it can be
> considered as a bug.
> If I use
> format('%.3f', [-0.0001]
On Thursday 12 October 2006 12:16, Andrea Mauri wrote:
> Dear all,
> this is my first mail to this mailing list, I'm not sure this is the
> correct one to post this topic.
> I noticed a strange behavior of the format function. I'm not sure it
> can be considered as a bug.
> If I use
> format('%.3f'
Dear all,
this is my first mail to this mailing list, I'm not sure this is the
correct one to post this topic.
I noticed a strange behavior of the format function. I'm not sure it can
be considered as a bug.
If I use
format('%.3f', [-0.0001])
the resulting string is
-0.000
and not
0.000
Why?
A
27 matches
Mail list logo