Opened 11 years ago

Closed 11 years ago

#627 closed defect (fixed)

Call to `log` is ambigous to double and float

Reported by: Dagobert Michelsen Owned by: Olly Betts
Priority: normal Milestone: 1.3.2
Component: Other Version: 1.3.1
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: Solaris

Description

The call to log in weight/tfidfweight.cc is ambigous as it can be cast to double and float. E.g. making the type explicit solves the issue as in the attached patch.

Attachments (2)

0003-log-is-ambigous-to-float-and-double.patch (697 bytes ) - added by Dagobert Michelsen 11 years ago.
Make type explicit when calling log
0001-Force-float-to-disambiguise-float-double-invocation-.patch (1.8 KB ) - added by Dagobert Michelsen 11 years ago.
Disabiguise invocation of log() in tests/api_weight.cc

Download all attachments as: .zip

Change History (5)

by Dagobert Michelsen, 11 years ago

Make type explicit when calling log

comment:1 by Olly Betts, 11 years ago

Milestone: 1.3.2
Resolution: fixed
Status: newclosed

Thanks, but this is actually already fixed on trunk in r17426.

comment:2 by Dagobert Michelsen, 11 years ago

Resolution: fixed
Status: closedreopened

There are also several invocation of log() in tests/api_weight.cc. The atatched patch forces the invocations to float.

by Dagobert Michelsen, 11 years ago

Disabiguise invocation of log() in tests/api_weight.cc

comment:3 by Olly Betts, 11 years ago

Resolution: fixed
Status: reopenedclosed

Thanks for the patch. I think we should actually use double here, since we're checking the answers against calculations done with doubles inside the library.

Fixed in trunk r17500. This code isn't in 1.2, so nothing to backport.

Note: See TracTickets for help on using tickets.