home › Forums › # Technical Support › double-promotion warning in Operation.h
Tagged: double-promotion warning
- This topic has 3 replies, 3 voices, and was last updated 4 years, 11 months ago by
Unknown.
-
AuthorPosts
-
December 12, 2018 at 23:56 #6286
Unknown
MemberHi,
I am getting a warning when compiling Operation.h. Am I missing something ?
Thanks,
Marc/vagrant/Spider_NJSDK-12718-fuzzyLite-integration/Spider/include/fl/Operation.h: In instantiation of ‘static bool fl::Operation::isInf(T) [with T = float]’:
/vagrant/Spider_NJSDK-12718-fuzzyLite-integration/Spider/include/fl/Operation.h:983:29: required from ‘static std::string fl::Operation::str(T, int, std::ios_base::fmtflags) [with T = float; std::string = std::basic_string<char>; std::ios_base::fmtflags = std::_Ios_Fmtflags]’
/vagrant/Spider_NJSDK-12718-fuzzyLite-integration/Spider/include/fl/Operation.h:1041:24: required from here
/vagrant/Spider_NJSDK-12718-fuzzyLite-integration/Spider/include/fl/Operation.h:623:18: error: implicit conversion from ‘float’ to ‘fl::scalar {aka double}’ to match other operand of binary expression [-Werror=double-promotion]
return x == fl::inf or x == -fl::inf;December 13, 2018 at 10:35 #6287Juan Rada-Vilela (admin)
KeymasterThanks for reporting this.
What compiler are you using? You do not need to worry about it. It might be just a new warning implemented in a new compiler version. I will take a look at this for the next version.
Cheers,
JuanDecember 14, 2018 at 03:11 #6288Unknown
MemberHi,
see hereunder for compiler revision.
No problem, I have added pragma to ignore this warning.
Marc
[80481510acaa][amstoutzm][build]gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.8.5/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure –prefix=/usr –mandir=/usr/share/man –infodir=/usr/share/info –with-bugurl=http://bugzilla.redhat.com/bugzilla –enable-bootstrap –enable-shared –enable-threads=posix –enable-checking=release –with-system-zlib –enable-__cxa_atexit –disable-libunwind-exceptions –enable-gnu-unique-object –enable-linker-build-id –with-linker-hash-style=gnu –enable-languages=c,c++,objc,obj-c++,java,fortran,ada,go,lto –enable-plugin –enable-initfini-array –disable-libgcj –with-isl=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/isl-install –with-cloog=/builddir/build/BUILD/gcc-4.8.5-20150702/obj-x86_64-redhat-linux/cloog-install –enable-gnu-indirect-function –with-tune=generic –with-arch_32=x86-64 –build=x86_64-redhat-linux
Thread model: posix
gcc version 4.8.5 20150623 (Red Hat 4.8.5-28) (GCC)December 27, 2018 at 23:38 #6293Unknown
MemberWhat method do I call if I want to see a rule which was fired from the rule base?
Example if I have four rules from the tipping problem
takagiSugeno.addRule(Rule.parse(“if service is poor or food is rancid then tsTip is cheap”, engine));
takagiSugeno.addRule(Rule.parse(“if service is good then tsTip is average”, engine));
takagiSugeno.addRule(Rule.parse(“if service is excellent or food is delicious then tsTip is generous with 0.5”, engine));
takagiSugeno.addRule(Rule.parse(“if service is excellent and food is delicious then tsTip is generous with 1.0”, engine));
engine.addRuleBlock(takagiSugeno);I wan to know which rule is fired in every iteration.
like Cheap, average or delicious -
AuthorPosts
- You must be logged in to reply to this topic.