Begin forwarded message:
> From: Bart Demoen <Bart.Demoen_at_cs.kuleuven.ac.be>
> Date: 16 de novembro de 2006 08:30:19 GMT+00:00
> To: ok_at_cs.otago.ac.nz
> Cc: Bart.Demoen_at_cs.kuleuven.ac.be, Daniel.Diaz_at_inria.fr,
> Remy.Haemmerle_at_inria.fr, amd_at_di.fct.unl.pt, bagnara_at_cs.unipr.it,
> herme_at_clip.dia.fi.upm.es, jhodgson_at_sju.edu, jpaulo_at_di.ubi.pt,
> kbowen_at_als.com, kostis_at_user.it.uu.se, mary_at_amzi.com, matsc_at_sics.se,
> mc_at_declarativa.com, mc_at_uga.edu, mcarro_at_fi.upm.es,
> nakamura_at_k.dendai.ac.jp, nzhou_at_acm.org, ok_at_atlas.otago.ac.nz,
> oskar_at_ifcomputer.co.jp, pmoura_at_di.ubi.pt, pts_at_cs.bme.hu,
> roger.scowen_at_npl.co.uk, spa_at_di.uevora.pt, szeredi_at_cs.bme.hu,
> vitor_at_cos.ufrj.br, warren_at_cs.sunysb.edu, wielemak_at_science.uva.nl
> Subject: Re: Preliminary draft for the revised ISO Prolog core
> standard
>
>
>> min/2 and max/2
>>
>> For max, the implementation has the choice of returning the
>> largest argument as is or applying the rules of floating-point
>> contagion, taking all the arguments into consideration for
>> contagion purposes.
>>
>> So Common Lisp does allow it. At least it doesn't require it.
>> By experiment, max/2 in SWI Prolog and SICStus Prolog already
>> behaves
>> the way this definition requires. I don't like it. I don't
>> like it
>> at all, but if it IS the common behaviour, it had better
>> become the
>> standard behaviour.
>
> I don't like it either.
> Also, SWI 5.6.12 doesn't - maybe that narrows the Prologs that do it
> down to SICStus and that could render more discussion on this
> fruitless. (or did Jan introduce it in newer versions that 5.6.12 ?)
>
> One consequence of this floating-point contagion is that in a
> system with
> bigints - like SICStus - max/2 can now also throw an overflow
> exception:
>
> | ?- X is 234<<23423, Y is max(X,0.1).
> ! Evaluation error in argument 2 of is/2
> ! float_overflow at 2482014388617793184935802414678 [some more digits
> snipped away by me]
>
> SICStus seems happy to evaluate X is 234<<23423 - so the << eval is
> not the
> problem.
>
> Cheers
>
> Bart Demoen
-----------------------------------------------------------------
Paulo Jorge Lopes de Moura
Dep. of Computer Science, University of Beira Interior
6201-001 Covilhã, Portugal
Office 4.3 Ext. 3257
Phone: +351 275319891 Fax: +351 275319899
Email: <mailto:pmoura_at_di.ubi.pt>
Home page: <http://www.di.ubi.pt/~pmoura>
Research: <http://logtalk.org/>
-----------------------------------------------------------------
Received on Mon Jul 14 2008 - 13:01:03 EST
This archive was generated by hypermail 2.2.0 : Wed Sep 08 2010 - 23:28:17 EST