xsl-list
[Top] [All Lists]

## Re: [xsl] floor() and idiv

2008-11-06 15:30:52
```2008/11/6 Colin Paul Adams <colin(_at_)colina(_dot_)demon(_dot_)co(_dot_)uk>:
```
```"Andrew" == Andrew Welch
<andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com> writes:
```
```
>> >> Gestalt gives 10, 10, 10.
>>
Andrew> As far as I understand, which is not very far, it's a
Andrew> fundamental problem with binary arithmetic.  The standard
Andrew> division technique is fast but incurs this sort of
Andrew> problem, while the BigDecimal approach is exact but much
Andrew> slower.

You've lost me - we were talking about integer division, I thought.
```
```
1000000000000000000000000000000001 is just too big for an 32 bit
integer...  (I think that's why DC chose it)

```
```If you are talking about xs:double, compared with xs:decimal, then
yes. But I don't see how that comes into the problem.
```
```
I think it's the problem of representing a decimal:

http://speleotrove.com/decimal/decifaq1.html#inexact

--
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

```
 Current Thread [xsl] floor() and idiv, Andrew Welch Re: [xsl] floor() and idiv, mozer Re: [xsl] floor() and idiv, David Carlisle Re: [xsl] floor() and idiv, mozer Re: [xsl] floor() and idiv, Michael Ludwig Re: [xsl] floor() and idiv, Colin Paul Adams Re: [xsl] floor() and idiv, Andrew Welch Re: [xsl] floor() and idiv, Colin Paul Adams Re: [xsl] floor() and idiv, Andrew Welch Re: [xsl] floor() and idiv, Colin Paul Adams Re: [xsl] floor() and idiv, Andrew Welch <= Re: [xsl] floor() and idiv, Colin Paul Adams Re: [xsl] floor() and idiv, Andrew Welch Re: [xsl] floor() and idiv, David Carlisle Re: [xsl] floor() and idiv, Colin Paul Adams Re: [xsl] floor() and idiv, David Carlisle Re: [xsl] floor() and idiv, Colin Paul Adams Re: [xsl] floor() and idiv, David Carlisle RE: [xsl] floor() and idiv, Michael Kay RE: [xsl] floor() and idiv, Michael Kay