Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:19
erlang
2082-Support-math-fmod-2-BIF-on-compiler.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 2082-Support-math-fmod-2-BIF-on-compiler.patch of Package erlang
From 3137cabe8ac09841fcaa4786fd7da8fc7caf621b Mon Sep 17 00:00:00 2001 From: Guilherme Andrade <g@gandrade.net> Date: Tue, 25 Oct 2016 22:59:50 +0100 Subject: [PATCH 2/3] Support math:fmod/2 BIF on compiler --- lib/compiler/src/beam_type.erl | 1 + lib/compiler/src/beam_validator.erl | 1 + lib/compiler/src/erl_bifs.erl | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/compiler/src/beam_type.erl b/lib/compiler/src/beam_type.erl index b477629..d324580 100644 --- a/lib/compiler/src/beam_type.erl +++ b/lib/compiler/src/beam_type.erl @@ -594,6 +594,7 @@ is_math_bif(atan2, 2) -> true; is_math_bif(pow, 2) -> true; is_math_bif(ceil, 1) -> true; is_math_bif(floor, 1) -> true; +is_math_bif(fmod, 2) -> true; is_math_bif(pi, 0) -> true; is_math_bif(_, _) -> false. diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl index 6e53f53..5659077 100644 --- a/lib/compiler/src/beam_validator.erl +++ b/lib/compiler/src/beam_validator.erl @@ -1646,6 +1646,7 @@ return_type_math(atan2, 2) -> {float,[]}; return_type_math(pow, 2) -> {float,[]}; return_type_math(ceil, 1) -> {float,[]}; return_type_math(floor, 1) -> {float,[]}; +return_type_math(fmod, 2) -> {float,[]}; return_type_math(pi, 0) -> {float,[]}; return_type_math(F, A) when is_atom(F), is_integer(A), A >= 0 -> term. diff --git a/lib/compiler/src/erl_bifs.erl b/lib/compiler/src/erl_bifs.erl index 831730b..d60f73d 100644 --- a/lib/compiler/src/erl_bifs.erl +++ b/lib/compiler/src/erl_bifs.erl @@ -138,6 +138,7 @@ is_pure(math, erf, 1) -> true; is_pure(math, erfc, 1) -> true; is_pure(math, exp, 1) -> true; is_pure(math, floor, 1) -> true; +is_pure(math, fmod, 2) -> true; is_pure(math, log, 1) -> true; is_pure(math, log2, 1) -> true; is_pure(math, log10, 1) -> true; -- 2.10.2
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor