← Back to team overview

ffc team mailing list archive

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

 

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)?

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.
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
>



Follow ups

References