Re: Numeric problem in BlackBox 1.4

From: René A. Krywult <"René>
Date: Thu, 10 Apr 2003 22:58:34 +0200

----boundary-LibPST-iamunique-958675149_-_-
Content-type: text/plain

After a change of eMail provider, I'm just updating myself on what
happened.

This thread brought me to a "problem" I think to be rather strange.

I'm using BB 1.3 with dtF as a database.

I'm storing a currency value in a DECIMAL(15,2) column. Then I have to
print out a list. TO do this, I convert the Currency-value to a REAL via

REAL=CURRENCY.val/Math.Power(10,CURRENCY.scale),

and then I use TextMappers.Formatter.WriteReal for output.

This SOMETIMES leads to something like
Currency = 69.0
REAL = 68.9999999999

Is this the same topic?

Would it be better to transform the currency.val to a ARRAY 15 OF CHAR
and then enter the decimal point according to .scale?

Rene

ftkachov{([at]})nowhere.xy

> Should not the matter of
> intVar = realVar
> be left out of the Language Report as it seems to be implementation
> dependent?
> The Report does say that INTEGER is converted to REAL in this case,
> whereas equating two REALs is a dangerous thing as any course
> of numerical math would say?
> Do we really want at the level of Languager Report tell Intel
> how to implement FP unit?
> --------------------------------------------
>
> To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
> blackbox-request{([at]})nowhere.xy
>
> To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.
>
> Send any problem reports or questions related to this email list to the list owner at
> owner-blackbox{([at]})nowhere.xy
>
> Current posting policy:
>
> a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.
>
> b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.
--------------------------------------------

To unsubscribe from this mailing list, send a message containing the word "unsubscribe" to:
   blackbox-request{([at]})nowhere.xy

To get a list of valid e-mail commands and instructions on their usage, send a message containing the word "help" to the above address.

Send any problem reports or questions related to this email list to the list owner at
   owner-blackbox{([at]})nowhere.xy

Current posting policy:

a) To post you should use the same address by which you are subscribed to the mailing list. That way, the list server will recognize you as subscriber and forward your posting immediately, without creating any overhead.

b) If, for some reason, you cannot post from the address, by which you are subscribed, your message will be moderated to avoid spam. Please understand that moderation will often cause some delay, in particular over weekends or holydays.


----boundary-LibPST-iamunique-958675149_-_-
Content-type: application/rtf
Content-transfer-encoding: base64
Content-Disposition: attachment; filename="rtf-body.rtf"

e1xydGYxXGFuc2lcYW5zaWNwZzEyNTJcZnJvbXRleHQgXGRlZmYwe1xmb250dGJsDQp7XGYwXGZz
d2lzcyBBcmlhbDt9DQp7XGYxXGZtb2Rlcm4gQ291cmllciBOZXc7fQ0Ke1xmMlxmbmlsXGZjaGFy
c2V0MiBTeW1ib2w7fQ0Ke1xmM1xmbW9kZXJuXGZjaGFyc2V0MCBDb3VyaWVyIE5ldzt9fQ0Ke1xj
b2xvcnRibFxyZWQwXGdyZWVuMFxibHVlMDtccmVkMFxncmVlbjBcYmx1ZTI1NTt9DQpcdWMxXHBh
cmRccGxhaW5cZGVmdGFiMzYwIFxmMFxmczIwIEFmdGVyIGEgY2hhbmdlIG9mIGVNYWlsIHByb3Zp
ZGVyLCBJJ20ganVzdCB1cGRhdGluZyBteXNlbGYgb24gd2hhdFxwYXINCmhhcHBlbmVkLlxwYXIN
ClxwYXINClRoaXMgdGhyZWFkIGJyb3VnaHQgbWUgdG8gYSAicHJvYmxlbSIgSSB0aGluayB0byBi
ZSByYXRoZXIgc3RyYW5nZS5ccGFyDQpccGFyDQpJJ20gdXNpbmcgQkIgMS4zIHdpdGggZHRGIGFz
IGEgZGF0YWJhc2UuXHBhcg0KXHBhcg0KSSdtIHN0b3JpbmcgYSBjdXJyZW5jeSB2YWx1ZSBpbiBh
IERFQ0lNQUwoMTUsMikgY29sdW1uLiBUaGVuIEkgaGF2ZSB0b1xwYXINCnByaW50IG91dCBhIGxp
c3QuIFRPIGRvIHRoaXMsIEkgY29udmVydCB0aGUgQ3VycmVuY3ktdmFsdWUgdG8gYSBSRUFMIHZp
YVxwYXINClxwYXINClJFQUw9Q1VSUkVOQ1kudmFsL01hdGguUG93ZXIoMTAs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YXINClxwYXINCmEpIFRvIHBvc3QgeW91IHNob3VsZCB1c2Ug
dGhlIHNhbWUgYWRkcmVzcyBieSB3aGljaCB5b3UgYXJlIHN1YnNjcmliZWQgdG8gdGhlIG1haWxp
bmcgbGlzdC4gVGhhdCB3YXksIHRoZSBsaXN0IHNlcnZlciB3aWxsIHJlY29nbml6ZSB5b3UgYXMg
c3Vic2NyaWJlciBhbmQgZm9yd2FyZCB5b3VyIHBvc3RpbmcgaW1tZWRpYXRlbHksIHdpdGhvdXQg
Y3JlYXRpbmcgYW55IG92ZXJoZWFkLlxwYXINClxwYXINCmIpIElmLCBmb3Igc29tZSByZWFzb24s
IHlvdSBjYW5ub3QgcG9zdCBmcm9tIHRoZSBhZGRyZXNzLCBieSB3aGljaCB5b3UgYXJlIHN1YnNj
cmliZWQsIHlvdXIgbWVzc2FnZSB3aWxsIGJlIG1vZGVyYXRlZCB0byBhdm9pZCBzcGFtLiBQbGVh
c2UgdW5kZXJzdGFuZCB0aGF0IG1vZGVyYXRpb24gd2lsbCBvZnRlbiBjYXVzZSBzb21lIGRlbGF5
LCBpbiBwYXJ0aWN1bGFyIG92ZXIgd2Vla2VuZHMgb3IgaG9seWRheXMuXHB9fQBtcA==


----boundary-LibPST-iamunique-958675149_-_---
Received on Thu Apr 10 2003 - 22:58:34 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:29:22 UTC