---
source: compiler-core/src/erlang/tests.rs
expression: "pub fn and(x, y) { x && y }\npub fn or(x, y) { x || y }\npub fn remainder(x, y) { x % y }\npub fn fdiv(x, y) { x /. y }\n            "
---
----- SOURCE CODE
pub fn and(x, y) { x && y }
pub fn or(x, y) { x || y }
pub fn remainder(x, y) { x % y }
pub fn fdiv(x, y) { x /. y }
            

----- COMPILED ERLANG
-module(my@mod).
-compile([no_auto_import, nowarn_ignored, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch, inline]).
-export(['and'/2, 'or'/2, remainder/2, fdiv/2]).

-file("project/test/my/mod.gleam", 1).
-spec 'and'(boolean(), boolean()) -> boolean().
'and'(X, Y) ->
    X andalso Y.

-file("project/test/my/mod.gleam", 2).
-spec 'or'(boolean(), boolean()) -> boolean().
'or'(X, Y) ->
    X orelse Y.

-file("project/test/my/mod.gleam", 3).
-spec remainder(integer(), integer()) -> integer().
remainder(X, Y) ->
    case Y of
        0 ->
            0;

        _value ->
            X rem _value
    end.

-file("project/test/my/mod.gleam", 4).
-spec fdiv(float(), float()) -> float().
fdiv(X, Y) ->
    case Y of
        +0.0 ->
            +0.0;

        -0.0 ->
            -0.0;

        _value ->
            X / _value
    end.
