← Back to team overview

ffc team mailing list archive

Re: buildbot failure in FEniCS Buildbot on ffc-lucid-amd64

 


On 09/03/11 09:19, Kristian Ølgaard wrote:
> On 9 March 2011 08:36, Anders Logg <logg@xxxxxxxxx> wrote:
>> On Wed, Mar 09, 2011 at 08:31:08AM +0100, Marie E. Rognes wrote:
>>>
>>>
>>> On 03/09/2011 08:29 AM, Anders Logg wrote:
>>>> Buildbot looks green now for FFC.
>>>
>>> I regenerated the references.
>>>
>>> The mac-bot complains because of differences between 0.55 and
>>> 0.55000000000000004. Don't know how to test/fix.
>>
>> Very strange. The problem does not seem to be in the generated code
>> (where we use rounding to relatively few digits to get reproducable
>> results) but in the UFL representation string. I don't know any good
>> solution.
> 
> Could we simply use something like:
> 
> "%.16g" % self._value
> 
> instead of:
> 
> repr(self._value)
> 
> in constantvalue.FloatValue (when assigning to self._repr)?
> 

Proposal sounds sensible to me - we should control the precision ourselves.

> On a related note, do we use:
> 
> f1 = "%%.%df" % precision
> 
> instead of
> 
> f1 = "%%.%dg" % precision
> 
> for any reason in ffc.cpp.set_float_formatting()
> 
> If we use 'g' we could get rid of trailing zeros, meaning that values
> in the code would be '1' instead of '1.0000000000000000000'
> which will make the code simpler to look at and smaller in size.

That would be nice. It could make some files considerably smaller.

Garth

> Perhaps there are some int vs. float issues?
> 
> Kristian
> 
>> --
>> Anders
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~ffc
>> Post to     : ffc@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~ffc
>> More help   : https://help.launchpad.net/ListHelp
>>
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~ffc
> Post to     : ffc@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ffc
> More help   : https://help.launchpad.net/ListHelp



References