Opened 12 years ago
Closed 12 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)
Change History (5)
by , 12 years ago
| Attachment: | 0003-log-is-ambigous-to-float-and-double.patch added |
|---|
comment:1 by , 12 years ago
| Milestone: | → 1.3.2 |
|---|---|
| Resolution: | → fixed |
| Status: | new → closed |
Thanks, but this is actually already fixed on trunk in r17426.
comment:2 by , 12 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
There are also several invocation of log() in tests/api_weight.cc. The atatched patch forces the invocations to float.
by , 12 years ago
| Attachment: | 0001-Force-float-to-disambiguise-float-double-invocation-.patch added |
|---|
Disabiguise invocation of log() in tests/api_weight.cc
comment:3 by , 12 years ago
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
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.

Make type explicit when calling log