Skip to content

Commit 3914283

Browse files
Merge pull request #37 from Happypig375/patch-10
Added Arcsec and arccosec
2 parents 58364d4 + cfd0c98 commit 3914283

3 files changed

Lines changed: 24 additions & 2 deletions

File tree

AngouriMath/Convenience/MathS.cs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,27 @@ public static EntitySet Solve(Entity equation, VariableEntity var)
203203
/// </summary>
204204
/// <param name="a"></param>
205205
/// <returns>
206-
/// angle between B and C
206+
/// angle between B and A
207207
/// </returns>
208208
public static Entity Arccotan(Entity a) => Arccotanf.Hang(a);
209+
210+
/// <summary>
211+
/// https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
212+
/// </summary>
213+
/// <param name="a"></param>
214+
/// <returns>
215+
/// angle between C and B
216+
/// </returns>
217+
public static Entity Arcsec(Entity a) => Arccosf.Hang(1 / a);
218+
219+
/// <summary>
220+
/// https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
221+
/// </summary>
222+
/// <param name="a"></param>
223+
/// <returns>
224+
/// angle between C and A
225+
/// </returns>
226+
public static Entity Arccosec(Entity a) => Arcsinf.Hang(1 / a);
209227

210228
/// <summary>
211229
/// https://en.wikipedia.org/wiki/Natural_logarithm
@@ -419,4 +437,4 @@ public static Entity OptimizeTree(Entity tree)
419437
return tree;
420438
}
421439
}
422-
}
440+
}

AngouriMath/Convenience/SynonymFunctions.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ internal static class SynonymFunctions
3636
{ "lnf", args => MathS.Log(args[0], MathS.e) },
3737
{ "secf", args => MathS.Sec(args[0]) },
3838
{ "cosecf", args => MathS.Cosec(args[0]) },
39+
{ "arcsecf", args => MathS.Arcsec(args[0]) },
40+
{ "arccosecf", args => MathS.Arccosec(args[0]) },
3941
};
4042

4143
/// <summary>

AngouriMath/Core/FromString/SyntaxInfo.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ internal static class SyntaxInfo
4242
{ "arccos", 1 },
4343
{ "arctan", 1 },
4444
{ "arccotan", 1 },
45+
{ "arcsec", 1 },
46+
{ "arccosec", 1 },
4547
};
4648
internal static readonly Dictionary<char, string> operatorNames = new Dictionary<char, string>
4749
{

0 commit comments

Comments
 (0)