[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] assert in stratified_entity::assert_validity()
From: |
Greg Chicares |
Subject: |
Re: [lmi] assert in stratified_entity::assert_validity() |
Date: |
Sat, 31 Jul 2010 14:35:35 +0000 |
User-agent: |
Thunderbird 2.0.0.24 (Windows/20100228) |
On 2010-07-25 22:48Z, Vadim Zeitlin wrote:
>
> If I start a LMI and do Alt-F,N,I to create a new illustration I get an
> assert in stratified_entity::assert_validity() because limits_.back() is
> 1.0 and not infinity<double>(). The precise stack at the moment of assert
> is
>
> stratified_entity::assert_validity() Line 136
> stratified_entity::read(const xml::node & e={...}) Line 164
At that point, it should have finished reading an xml element,
so the object should pass all validity tests.
> Would you know of an explanation as to why this happens by chance? I did
> regenerate the project files, including sample.strata from which the
> offending value is being read by stratified_charges ctor, using
> product_files. Should I do something else to fix this?
That's the right way. Every '</limits>' should be preceded by
'<item>inf</item>':
$grep -B1 '</limits>' sample.strata |sed '/item/!d' |uniq; echo END
<item>inf</item>
END
> Or is it some
> artefact of MSVC build (I didn't test under Linux yet because I still
> didn't finish my floating point changes there)?
Oh...msvc...and you observe a value equal to one...sounds like the
problem I found with the OS's 'msvcrt.dll'. I figured they would
have fixed that in their commercial compiler, which provides its
own updated runtime.
'numeric_io_test.cpp':
// This test fails for como with msvcrt, because the latter
// defectively prints infinity as "1.#INF". Distressingly,
// that converts to '1.0'.
BOOST_TEST_EQUAL(inf_dbl, numeric_io_cast<double>(inf_str));
ISO/IEC 9899:1999 [7.19.6.1/8]:
| A double argument representing an infinity is converted in one of the
| styles [-]inf or [-]infinity — which style is implementation-defined.