sin

Generic Description

Computes the sine of an angle in radians. It is documented separately because numeric transforms change ranking, thresholds, and buckets in ways planner tools must not guess.

Simple example:

RETURN sin(radians(30.0)) AS value

Consumer-Level Explanation

Use it when angle-derived features are already part of the query pipeline. Prefer this function when the transformation is a deliberate part of the model or report, and name the derived value in a WITH stage when it will be reused.

More Detailed Explanation

sin is scalar math, so it is evaluated per row after graph patterns, procedure output, or map projections have produced values. Keep it close to the query when thresholds, ranking, and derived fields need to be auditable and reproducible.

Advanced Example

This example applies sin to a named score component after matching graph data, making the derived metric reviewable before ordering.

MATCH (e:REL)
WITH e, radians(properties(e).weight * 30.0) AS angle
RETURN type(e) AS relationship_type,
       sin(angle) AS directional_component
LIMIT 5

Real Use Cases

Real Limitations And Tradeoffs