Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
82cca16
added Cos(real) Cos(ArcCos()) Cos(-x)
DoggieGreg Jan 30, 2026
1c5b67f
Merge remote-tracking branch 'upstream/master'
DoggieGreg Feb 3, 2026
a79df3f
added more funcs to cos and sin
DoggieGreg Feb 3, 2026
158234b
added Cos(A+B) started transfering to Simplify Visitor
DoggieGreg Feb 6, 2026
647b196
Refactored funcs to match new requirements for simplify, fixed bugs that
DoggieGreg Feb 10, 2026
cb64dc1
fixed issues when compiling
DoggieGreg Feb 13, 2026
55dbbc9
implemented more functions for sine, created tan class and implented
DoggieGreg Feb 20, 2026
51acd6e
added sec cosec cotan, added real for those and fixed some functions in
DoggieGreg Feb 27, 2026
f893e69
added sin unit circle added radians to sin cos tan, started adding unit
DoggieGreg Mar 10, 2026
2d524bc
finished unit circle for degrees started unit circle for radians
DoggieGreg Mar 13, 2026
ee4d1bf
finished unit circle for sin, cos, and tan
DoggieGreg Mar 17, 2026
94b2b56
finished all identites for sin cos (except arc) added divide by 0 check
DoggieGreg Mar 20, 2026
66d81de
bug fixes in sin, cos, tan fininshed sec, cosec except 1/2 angle
DoggieGreg Mar 24, 2026
c845182
started on arc functions finished tan,cotan,secant,cosecant
DoggieGreg Mar 27, 2026
01d2333
finished arcsine implemented sin(arcsin(x))
DoggieGreg Mar 31, 2026
0a1db43
finished arcfunctions and started debugging
DoggieGreg Apr 3, 2026
0735be0
fixed all errors
DoggieGreg Apr 7, 2026
8e15caa
Started working on tests and worked on adding trig to serializers
DoggieGreg Apr 10, 2026
aa2af64
Fixed bug that stopped simply for trig functions to is simplify,
DoggieGreg Apr 14, 2026
d1f4bb9
Merge branch 'master' into master
DoggieGreg Apr 21, 2026
cb0095b
changed hpp tan functions to fix depreciated function error
DoggieGreg Apr 21, 2026
a300342
Merge branch 'master' of https://github.com/DoggieGreg/Oasis
DoggieGreg Apr 21, 2026
f904fb9
remved deprecated functions from tan classes
DoggieGreg Apr 21, 2026
23b4172
trig functions were missing from differentiate visitor
DoggieGreg Apr 21, 2026
1ca3fd8
changed gsl to gsl_lite for all trig simplify funcs
DoggieGreg Apr 21, 2026
167bc53
changed gsl to gsl_lite in mathMLSerializer
DoggieGreg Apr 21, 2026
a6fef39
added tan functions to differentiate visitor.cpp
DoggieGreg Apr 21, 2026
0a49931
fixed differentiate (not implemented)
DoggieGreg Apr 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions include/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
set(Oasis_HEADERS
# cmake-format: sortable
Oasis/Add.hpp
Oasis/Arccosine.hpp
Oasis/Arcsine.hpp
Oasis/Arctan.hpp
Oasis/BinaryExpression.hpp
Oasis/Concepts.hpp
Oasis/Cosecant.hpp
Oasis/Cosine.hpp
Oasis/Cotan.hpp
Oasis/Derivative.hpp
Oasis/DifferentiateVisitor.hpp
Oasis/Divide.hpp
Expand All @@ -22,9 +28,11 @@ set(Oasis_HEADERS
Oasis/Pi.hpp
Oasis/Real.hpp
Oasis/RecursiveCast.hpp
Oasis/Secant.hpp
Oasis/SimplifyVisitor.hpp
Oasis/Sine.hpp
Oasis/Subtract.hpp
Oasis/Tan.hpp
Oasis/UnaryExpression.hpp
Oasis/Undefined.hpp
Oasis/Variable.hpp
Expand Down
35 changes: 35 additions & 0 deletions include/Oasis/Arccosine.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// Created by Gregory Lemonnier 2/xx/26.
//

#ifndef OASIS_ARCCOSINE_HPP
#define OASIS_ARCCOSINE_HPP

#include "Expression.hpp"
#include "UnaryExpression.hpp"

namespace Oasis {

template <typename OperandT = Expression>
class Arccosine final :public UnaryExpression<Arccosine, OperandT> {
public:
Arccosine() = default;
Arccosine(const Arccosine& other)
: UnaryExpression<Arccosine, OperandT>(other)
{
}

explicit Arccosine(const OperandT& operand)
: UnaryExpression<Arccosine, OperandT>(operand)
{
}

[[nodiscard]] auto Integrate(const Expression& var) const -> std::unique_ptr<Expression> final;

EXPRESSION_TYPE(Arccosine)
EXPRESSION_CATEGORY(UnExp)
};

} // Oasis

#endif // OASIS_ARCCOSINE_HPP
36 changes: 36 additions & 0 deletions include/Oasis/Arcsine.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// Created by Gregory Lemonnier on 3/27/26.
//

#ifndef OASIS_ARCSINE_HPP
#define OASIS_ARCSINE_HPP

#include "Expression.hpp"
#include "UnaryExpression.hpp"

namespace Oasis {

template <typename OperandT = Expression>
class Arcsine final : public UnaryExpression<Arcsine, OperandT> {
public:
Arcsine() = default;
Arcsine(const Arcsine& other)
: UnaryExpression<Arcsine, OperandT>(other)
{
}

explicit Arcsine(const OperandT& operand)
: UnaryExpression<Arcsine, OperandT>(operand)
{
}


[[nodiscard]] auto Integrate(const Expression& var) const -> std::unique_ptr<Expression> final;

EXPRESSION_TYPE(Arcsine)
EXPRESSION_CATEGORY(UnExp)
};

} // Oasis

#endif // OASIS_ARCSINE_HPP
31 changes: 31 additions & 0 deletions include/Oasis/Arctan.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#ifndef OASIS_ARCTAN_HPP
#define OASIS_ARCTAN_HPP

#include "Expression.hpp"
#include "UnaryExpression.hpp"

namespace Oasis {

template <typename OperandT = Expression>
class Arctan final : public UnaryExpression<Arctan, OperandT> {
public:
Arctan() = default;
Arctan(const Arctan& other)
: UnaryExpression<Arctan, OperandT>(other)
{
}

explicit Arctan(const OperandT& operand)
: UnaryExpression<Arctan, OperandT>(operand)
{
}

[[nodiscard]] auto Integrate(const Expression& var) const -> std::unique_ptr<Expression> final;

EXPRESSION_TYPE(Arctan)
EXPRESSION_CATEGORY(UnExp)
};

} // Oasis

#endif // OASIS_ARCTAN_HPP
36 changes: 36 additions & 0 deletions include/Oasis/Cosecant.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// Created by Gregory Lemonnier 2/27/26.
//

#ifndef OASIS_COSECANT_HPP
#define OASIS_COSECANT_HPP

#include "Expression.hpp"
#include "UnaryExpression.hpp"

namespace Oasis {

template <typename OperandT = Expression>
class Cosecant final :public UnaryExpression<Cosecant, OperandT> {
public:
Cosecant() = default;
Cosecant(const Cosecant& other)
: UnaryExpression<Cosecant, OperandT>(other)
{
}

explicit Cosecant(const OperandT& operand)
: UnaryExpression<Cosecant, OperandT>(operand)
{
}


[[nodiscard]] auto Integrate(const Expression& var) const -> std::unique_ptr<Expression> final;

EXPRESSION_TYPE(Cosecant)
EXPRESSION_CATEGORY(UnExp)
};

} // Oasis

#endif // OASIS_COSECANT_HPP
35 changes: 35 additions & 0 deletions include/Oasis/Cosine.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// Created by Gregory Lemonnier 2/xx/26.
//

#ifndef OASIS_COSINE_HPP
#define OASIS_COSINE_HPP

#include "Expression.hpp"
#include "UnaryExpression.hpp"

namespace Oasis {

template <typename OperandT = Expression>
class Cosine final :public UnaryExpression<Cosine, OperandT> {
public:
Cosine() = default;
Cosine(const Cosine& other)
: UnaryExpression<Cosine, OperandT>(other)
{
}

explicit Cosine(const OperandT& operand)
: UnaryExpression<Cosine, OperandT>(operand)
{
}

[[nodiscard]] auto Integrate(const Expression& vra) const -> std::unique_ptr<Expression> final;

EXPRESSION_TYPE(Cosine)
EXPRESSION_CATEGORY(UnExp)
};

} // Oasis

#endif // OASIS_COSINE_HPP
35 changes: 35 additions & 0 deletions include/Oasis/Cotan.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// Created by Gregory Lemonnier 2/xx/26.
//

#ifndef OASIS_COTAN_HPP
#define OASIS_COTAN_HPP

#include "Expression.hpp"
#include "UnaryExpression.hpp"

namespace Oasis {

template <typename OperandT = Expression>
class Cotan final :public UnaryExpression<Cotan, OperandT> {
public:
Cotan() = default;
Cotan(const Cotan& other)
: UnaryExpression<Cotan, OperandT>(other)
{
}

explicit Cotan(const OperandT& operand)
: UnaryExpression<Cotan, OperandT>(operand)
{
}

[[nodiscard]] auto Integrate(const Expression& var) const -> std::unique_ptr<Expression> final;

EXPRESSION_TYPE(Cotan)
EXPRESSION_CATEGORY(UnExp)
};

} // Oasis

#endif // OASIS_COTAN_HPP
8 changes: 8 additions & 0 deletions include/Oasis/DifferentiateVisitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ class DifferentiateVisitor final : public TypedVisitor<std::expected<gsl_lite::n
auto TypedVisit(const Log<Expression, Expression>& log) -> RetT override;
auto TypedVisit(const Negate<Expression>& negate) -> RetT override;
auto TypedVisit(const Sine<Expression>& sine) -> RetT override;
auto TypedVisit(const Cosine<Expression>& cosine) -> RetT override;
auto TypedVisit(const Tan<Expression>& tan) -> RetT override;
auto TypedVisit(const Secant<Expression>& secant) -> RetT override;
auto TypedVisit(const Cosecant<Expression>& cosecant) -> RetT override;
auto TypedVisit(const Cotan<Expression>& cotan) -> RetT override;
auto TypedVisit(const Arcsine<Expression>& arcsine) -> RetT override;
auto TypedVisit(const Arccosine<Expression>& arccosine) -> RetT override;
auto TypedVisit(const Arctan<Expression>& arctan) -> RetT override;
auto TypedVisit(const Derivative<Expression, Expression>& derivative) -> RetT override;
auto TypedVisit(const Integral<Expression, Expression>& integral) -> RetT override;
auto TypedVisit(const Matrix& matrix) -> RetT override;
Expand Down
10 changes: 9 additions & 1 deletion include/Oasis/Expression.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@ enum class ExpressionType {
Pi,
EulerNumber,
Magnitude,
Sine
Sine,
Cosine,
Tan,
Cosecant,
Secant,
Cotan,
Arcsine,
Arccosine,
Arctan
};

/**
Expand Down
24 changes: 24 additions & 0 deletions include/Oasis/FwdDecls.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,15 @@ class Pi;
template <typename, typename>
class Add;

template <typename>
class Arcsine;

template <typename>
class Arccosine;

template <typename>
class Arctan;

template <typename, typename>
class Subtract;

Expand All @@ -43,6 +52,21 @@ class Magnitude;
template <typename>
class Sine;

template <typename>
class Cosine;

template <typename>
class Tan;

template <typename>
class Cosecant;

template <typename>
class Secant;

template <typename>
class Cotan;

template <typename, typename>
class Derivative;

Expand Down
35 changes: 35 additions & 0 deletions include/Oasis/Secant.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
//
// Created by Gregory Lemonnier 2/xx/26.
//

#ifndef OASIS_SECANT_HPP
#define OASIS_SECANT_HPP

#include "Expression.hpp"
#include "UnaryExpression.hpp"

namespace Oasis {

template <typename OperandT = Expression>
class Secant final :public UnaryExpression<Secant, OperandT> {
public:
Secant() = default;
Secant(const Secant& other)
: UnaryExpression<Secant, OperandT>(other)
{
}

explicit Secant(const OperandT& operand)
: UnaryExpression<Secant, OperandT>(operand)
{
}

[[nodiscard]] auto Integrate(const Expression& var) const -> std::unique_ptr<Expression> final;

EXPRESSION_TYPE(Secant)
EXPRESSION_CATEGORY(UnExp)
};

} // Oasis

#endif // OASIS_SECANT_HPP
8 changes: 8 additions & 0 deletions include/Oasis/SimplifyVisitor.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,21 @@ class SimplifyVisitor final : public TypedVisitor<std::expected<gsl_lite::not_nu
auto TypedVisit(const Variable& variable) -> RetT override;
auto TypedVisit(const Undefined& undefined) -> RetT override;
auto TypedVisit(const Add<Expression, Expression>& add) -> RetT override;
auto TypedVisit(const Arcsine<Expression>& arcsine) -> RetT override;
auto TypedVisit(const Arccosine<Expression>& arccosine) -> RetT override;
auto TypedVisit(const Arctan<Expression>& arctan) -> RetT override;
auto TypedVisit(const Subtract<Expression, Expression>& subtract) -> RetT override;
auto TypedVisit(const Multiply<Expression, Expression>& multiply) -> RetT override;
auto TypedVisit(const Divide<Expression, Expression>& divide) -> RetT override;
auto TypedVisit(const Exponent<Expression, Expression>& exponent) -> RetT override;
auto TypedVisit(const Log<Expression, Expression>& log) -> RetT override;
auto TypedVisit(const Negate<Expression>& negate) -> RetT override;
auto TypedVisit(const Sine<Expression>& sine) -> RetT override;
auto TypedVisit(const Cosine<Expression>& cosine) -> RetT override;
auto TypedVisit(const Tan<Expression>& tan) -> RetT override;
auto TypedVisit(const Cosecant<Expression>& cosecant) -> RetT override;
auto TypedVisit(const Secant<Expression>& secant) -> RetT override;
auto TypedVisit(const Cotan<Expression>& cotan) -> RetT override;
auto TypedVisit(const Derivative<Expression, Expression>& derivative) -> RetT override;
auto TypedVisit(const Integral<Expression, Expression>& integral) -> RetT override;
auto TypedVisit(const Matrix& matrix) -> RetT override;
Expand Down
Loading
Loading