Minimal extension to make trig work with a custom type

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • Scout APM - Less time debugging, more time building
  • SonarLint - Clean code begins in your IDE with SonarLint
  • SaaSHub - Software Alternatives and Reviews
  • julia

    The Julia Programming Language

    I found it in the source code for Base. You were definitely right. The sin function, for instance, is written there as sin(x::T) where T <: Union{Float32, Float64}, which then calls a sin kernel function for T, and that, at least as it’s written there, definitely can’t take nonfloats. I can’t tell yet if the math it’s doing actually requires floats, but the built in method for it involves multiplying the input by 0.5, so you’d have to redefine that completely or give it a way of promoting the input to float.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts