shithub: riscv

Download patch

ref: 0b9c6fa117c3fe571aed497579b3340b2f8a1164
parent: c696998ec30d10043258ac91a0c9c52f80102773
author: Sigrid <[email protected]>
date: Fri Nov 27 05:51:16 EST 2020

fplot: add hyperbolic functions

--- a/sys/src/cmd/fplot.c
+++ b/sys/src/cmd/fplot.c
@@ -57,6 +57,9 @@
 void osin(void) { *sp = sin(*sp); }
 void ocos(void) { *sp = cos(*sp); }
 void otan(void) { *sp = tan(*sp); }
+void osinh(void) { *sp = sinh(*sp); }
+void ocosh(void) { *sp = cosh(*sp); }
+void otanh(void) { *sp = tanh(*sp); }
 void oasin(void) { *sp = asin(*sp); }
 void oacos(void) { *sp = acos(*sp); }
 void oatan(void) { *sp = atan(*sp); }
@@ -80,6 +83,9 @@
 	"/",	OBINARY,	0,	200,	div,
 	"%",	OBINARY,	0,	200,	mod,
 	"^",	OBINARY,	1,	300,	pot,
+	"sinh",	OUNARY,		0,	400,	osinh,
+	"cosh",	OUNARY,		0,	400,	ocosh,
+	"tanh",	OUNARY,		0,	400,	otanh,
 	"abs",	OUNARY,		0,	400,	oabs,
 	"sin",	OUNARY,		0,	400,	osin,
 	"cos",	OUNARY,		0,	400,	ocos,