Skip to content

Commit 2459d24

Browse files
committed
New hyperbolic trig functions
1 parent 05d4b34 commit 2459d24

File tree

3 files changed

+214
-0
lines changed

3 files changed

+214
-0
lines changed

modules/ROOT/pages/deprecations-additions-removals-compatibility.adoc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,16 @@ CREATE DATABASE db OPTIONS { seedRestoreUntil: ... }
203203
| The option `seedRestoreUntil` can now be specified in the `CREATE DATABASE` `OPTIONS` map.
204204
This allows a database to be seeded up to a specific date or transaction ID.
205205
For more information, see link:{neo4j-docs-base-uri}/operations-manual/current/clustering/databases/#cluster-seed-uri[Operations Manual -> Clustering -> Seed from URI].
206+
207+
a|
208+
label:functionality[]
209+
label:new[]
210+
[source, cypher, role="noheader"]
211+
----
212+
RETURN cosh(0.5), coth(0.5), sinh(0.5), tanh(0.5)
213+
----
214+
| Introduction of 4 new hyperbolic trigonometric Cypher functions.
215+
For more information, see xref:functions/mathematical-trigonometric.adoc[Mathematical functions - trigonometric].
206216
|===
207217

208218
[[cypher-deprecations-additions-removals-2025.01]]

modules/ROOT/pages/functions/index.adoc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,10 +310,18 @@ All trigonometric functions operate on radians, unless otherwise specified.
310310
| `cos(input :: FLOAT) :: FLOAT`
311311
| Returns the cosine of a `FLOAT`.
312312

313+
1.1+| xref::functions/mathematical-trigonometric.adoc#functions-cosh[`cosh()`] label:new[Introduced in 2025.03] +
314+
| `cosh(input :: FLOAT) :: FLOAT`
315+
| Returns the hyperbolic cosine of a `FLOAT`.
316+
313317
1.1+| xref::functions/mathematical-trigonometric.adoc#functions-cot[`cot()`]
314318
| `cot(input :: FLOAT) :: FLOAT`
315319
| Returns the cotangent of a `FLOAT`.
316320

321+
1.1+| xref::functions/mathematical-trigonometric.adoc#functions-coth[`coth()`] label:new[Introduced in 2025.03] +
322+
| `coth(input :: FLOAT) :: FLOAT`
323+
| Returns the hyperbolic cotangent of a `FLOAT`.
324+
317325
1.1+| xref::functions/mathematical-trigonometric.adoc#functions-degrees[`degrees()`]
318326
| `degrees(input :: FLOAT) :: FLOAT`
319327
| Converts radians to degrees.
@@ -334,10 +342,18 @@ All trigonometric functions operate on radians, unless otherwise specified.
334342
| `sin(input :: FLOAT) :: FLOAT`
335343
| Returns the sine of a `FLOAT`.
336344

345+
1.1+| xref::functions/mathematical-trigonometric.adoc#functions-sinh[`sinh()`] label:new[Introduced in 2025.03] +
346+
| `sinh(input :: FLOAT) :: FLOAT`
347+
| Returns the hyperbolic sine of a `FLOAT`.
348+
337349
1.1+| xref::functions/mathematical-trigonometric.adoc#functions-tan[`tan()`]
338350
| `tan(input :: FLOAT) :: FLOAT`
339351
| Returns the tangent of a `FLOAT`.
340352

353+
1.1+| xref::functions/mathematical-trigonometric.adoc#functions-tanh[`tanh()`] label:new[Introduced in 2025.03] +
354+
| `tanh(input :: FLOAT) :: FLOAT`
355+
| Returns the hyperbolic tangent of a `FLOAT`.
356+
341357
|===
342358

343359

modules/ROOT/pages/functions/mathematical-trigonometric.adoc

Lines changed: 188 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,52 @@ The cosine of `0.5` is returned.
234234
235235
======
236236

237+
[role=label--new-2025.03]
238+
[[functions-cosh]]
239+
== cosh()
240+
241+
.Details
242+
|===
243+
| *Syntax* 3+| `cosh(input)`
244+
| *Description* 3+| Returns the hyperbolic cosine of a `FLOAT`.
245+
.2+| *Arguments* | *Name* | *Type* | *Description*
246+
| `input` | `FLOAT` | A value.
247+
| *Returns* 3+| `FLOAT`
248+
|===
249+
250+
.Considerations
251+
|===
252+
253+
| `cosh(null)` returns `null`.
254+
255+
|===
256+
257+
258+
.+cosh()+
259+
======
260+
261+
.Query
262+
// tag::functions_mathematical_trigonometric_cos[]
263+
[source, cypher, indent=0]
264+
----
265+
RETURN cosh(0.7)
266+
----
267+
// end::functions_mathematical_trigonometric_cos[]
268+
269+
The hyperbolic cosine of `0.7` is returned.
270+
271+
.Result
272+
[role="queryresult",options="header,footer",cols="1*<m"]
273+
|===
274+
275+
| cosh(0.7)
276+
| 1.255169005630943
277+
1+d|Rows: 1
278+
279+
|===
280+
281+
======
282+
237283

238284
[[functions-cot]]
239285
== cot()
@@ -281,6 +327,53 @@ The cotangent of `0.5` is returned.
281327
======
282328

283329

330+
[role=label--new-2025.03]
331+
[[functions-coth]]
332+
== coth()
333+
334+
.Details
335+
|===
336+
| *Syntax* 3+| `coth(input)`
337+
| *Description* 3+| Returns the hyperbolic cotangent of a `FLOAT`.
338+
.2+| *Arguments* | *Name* | *Type* | *Description*
339+
| `input` | `FLOAT` | A value.
340+
| *Returns* 3+| `FLOAT`
341+
|===
342+
343+
.Considerations
344+
|===
345+
346+
| `coth(null)` returns `null`.
347+
| `coth(0)` returns `NaN`.
348+
349+
|===
350+
351+
.+coth()+
352+
======
353+
354+
.Query
355+
// tag::functions_mathematical_trigonometric_cot[]
356+
[source, cypher, indent=0]
357+
----
358+
RETURN coth(0.7)
359+
----
360+
// end::functions_mathematical_trigonometric_cot[]
361+
362+
The hyperbolic cotangent of `0.7` is returned.
363+
364+
.Result
365+
[role="queryresult",options="header,footer",cols="1*<m"]
366+
|===
367+
368+
| coth(0.7)
369+
| 1.654621635803
370+
1+d|Rows: 1
371+
372+
|===
373+
374+
======
375+
376+
284377
[[functions-degrees]]
285378
== degrees()
286379

@@ -535,6 +628,53 @@ The sine of `0.5` is returned.
535628
======
536629

537630

631+
[role=label--new-2025.03]
632+
[[functions-sinh]]
633+
== sinh()
634+
635+
.Details
636+
|===
637+
| *Syntax* 3+| `sinh(input)`
638+
| *Description* 3+| Returns the hyperbolic sine of a `FLOAT`.
639+
.2+| *Arguments* | *Name* | *Type* | *Description*
640+
| `input` | `FLOAT` | A value.
641+
| *Returns* 3+| `FLOAT`
642+
|===
643+
644+
.Considerations
645+
|===
646+
647+
| `sinh(null)` returns `null`.
648+
649+
|===
650+
651+
652+
.+sinh()+
653+
======
654+
655+
.Query
656+
// tag::functions_mathematical_trigonometric_sin[]
657+
[source, cypher, indent=0]
658+
----
659+
RETURN sinh(0.7)
660+
----
661+
// end::functions_mathematical_trigonometric_sin[]
662+
663+
The hyperbolic sine of `0.7` is returned.
664+
665+
.Result
666+
[role="queryresult",options="header,footer",cols="1*<m"]
667+
|===
668+
669+
| sinh(0.7)
670+
| 0.75858370184
671+
1+d|Rows: 1
672+
673+
|===
674+
675+
======
676+
677+
538678
[[functions-tan]]
539679
== tan()
540680

@@ -580,3 +720,51 @@ The tangent of `0.5` is returned.
580720
581721
======
582722

723+
724+
725+
[role=label--new-2025.03]
726+
[[functions-tanh]]
727+
== tanh()
728+
729+
.Details
730+
|===
731+
| *Syntax* 3+| `tanh(input)`
732+
| *Description* 3+| Returns the hyperbolic tangent of a `FLOAT`.
733+
.2+| *Arguments* | *Name* | *Type* | *Description*
734+
| `input` | `FLOAT` | A value.
735+
| *Returns* 3+| `FLOAT`
736+
|===
737+
738+
.Considerations
739+
|===
740+
741+
| `tanh(null)` returns `null`.
742+
743+
|===
744+
745+
746+
.+tanh()+
747+
======
748+
749+
.Query
750+
// tag::functions_mathematical_trigonometric_tan[]
751+
[source, cypher, indent=0]
752+
----
753+
RETURN tanh(0.7)
754+
----
755+
// end::functions_mathematical_trigonometric_tan[]
756+
757+
The hyperbolic tangent of `0.7` is returned.
758+
759+
.Result
760+
[role="queryresult",options="header,footer",cols="1*<m"]
761+
|===
762+
763+
| tanh(0.7)
764+
| 0.604367777117
765+
1+d|Rows: 1
766+
767+
|===
768+
769+
======
770+

0 commit comments

Comments
 (0)