GithubHelp home page GithubHelp logo

Comments (6)

mindok avatar mindok commented on August 17, 2024 1

Agree! I tried on 3 different PCs running MacOS, Windows & Linux.

from contex-samples.

mindok avatar mindok commented on August 17, 2024

What version of Erlang & Elixir do you have installed?

from contex-samples.

tanguilp avatar tanguilp commented on August 17, 2024
$ asdf current
elixir         1.9      (set by /home/tangui/.tool-versions)
erlang         21.0     (set by /home/tangui/.tool-versions)
nodejs         13.5.0   (set by /home/tangui/.tool-versions)

from contex-samples.

mindok avatar mindok commented on August 17, 2024

Could you try running something like this in iex:
:erlang.float_to_binary(12.5, [:compact, decimals: 0])

If that fails then I think you have some issue with your installation as that's erlang kernel code - from http://erlang.org/doc/man/erlang.html#float_to_binary-2

from contex-samples.

tanguilp avatar tanguilp commented on August 17, 2024
$ pwd
/tmp/contex-samples

$ iex -S mix phx.server
Erlang/OTP 21 [erts-10.0] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe]

[info] Running ContexSampleWeb.Endpoint with cowboy 2.7.0 at 0.0.0.0:4000 (http)
[info] Access ContexSampleWeb.Endpoint at http://localhost:4000
Interactive Elixir (1.9.0) - press Ctrl+C to exit (type h() ENTER for help)

iex(2)>  :erlang.float_to_binary(12.5, [:compact, decimals: 0])
"13"

from contex-samples.

tanguilp avatar tanguilp commented on August 17, 2024

Cannot reproduce with:

$ asdf current
elixir         1.9.0    (set by /home/home/.tool-versions)
erlang         22.1 (set by /home/home/.tool-versions)

on another computer. May be a local problem, I suggest we close this issue, and reopen it later if needed.

from contex-samples.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.