Problem with floats and rpc calls.

erlang erlang@REDACTED
Sat Sep 2 22:27:17 CEST 2006


Another beginner question. I'm using otp.net (jinterface ported to
.net) that I attempted to update for the current erlang. 
In an rpc call this works, and returns the expected string:

-module(rpctest).
-export([double/1]).

double(X) ->
    float_to_list(2.00 * X).

But this always returns the float 0, I can't see the reason.

-module(rpctest).
-export([double/1]).

double(X) ->
   2.00 * X.

Returns of strings, tuples, ints all seem to work ok.

 





More information about the erlang-questions mailing list