Skip to content

Commit 418f40d

Browse files
authored
Merge pull request #3 from alexpantyukhin/add_some_math
add some math
2 parents 6573c2f + a8f4b8f commit 418f40d

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

src/Fable.Python.fsproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<Compile Include="stdlib/Os.fs" />
1717
<Compile Include="stdlib/TkInter.fs" />
1818
<Compile Include="stdlib/Queue.fs" />
19+
<Compile Include="stdlib/Math.fs" />
1920

2021
<Compile Include="cognite-sdk/CogniteSdk.fs" />
2122
<Compile Include="flask/Flask.fs" />

src/stdlib/Math.fs

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
module Fable.Python.Math
2+
3+
open System
4+
open Fable.Core
5+
6+
// fsharplint:disable MemberNames
7+
8+
type IExports =
9+
abstract ceil : int -> int
10+
abstract ceil : float -> int
11+
abstract comb : int -> int -> int
12+
abstract copysign : float -> int -> float
13+
abstract fabs : float -> float
14+
abstract factorial : float -> float
15+
abstract floor : int -> int
16+
abstract floor : float -> int
17+
abstract fmod : int -> int -> int
18+
19+
abstract gcd : [<ParamArray>] ints: int[] -> int
20+
abstract isfinite : float -> bool
21+
abstract isfinite : int -> bool
22+
abstract isinf : float -> bool
23+
abstract isinf : int -> bool
24+
abstract isnan : float -> bool
25+
abstract isnan : int -> bool
26+
abstract lcm : [<ParamArray>] ints: int[] -> int
27+
28+
abstract exp : float -> float
29+
abstract expm1 : float -> float
30+
abstract log : float -> float
31+
abstract log1p : float -> float
32+
abstract log2 : float -> float
33+
abstract log10 : float -> float
34+
abstract pow : float -> float -> float
35+
36+
abstract acos : float -> float
37+
abstract asin : float -> float
38+
abstract atan : float -> float
39+
abstract atan2 : float -> float -> float
40+
abstract cos : float -> float
41+
abstract dist : float -> float -> float
42+
abstract sin : float -> float
43+
abstract tan : float -> float
44+
45+
[<ImportAll("math")>]
46+
let math: IExports = nativeOnly

0 commit comments

Comments
 (0)