Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Level of support for hyperbolic trig functions #525

Open
d01010101 opened this issue Feb 12, 2023 · 5 comments
Open

Level of support for hyperbolic trig functions #525

d01010101 opened this issue Feb 12, 2023 · 5 comments

Comments

@d01010101
Copy link

Why the following does not work? It does, though, if sin is used instead of sinh.

remap-shape (shape x y z)
    (/ x (sinh z))
    (/ y (sinh z))
    z)

In function sinh:
wrong-type-arg: Wrong type argument in position 1

What is the level of support of sinh? #348 shows "branch has conflicts that must be resolved". Or are there some math difficulties that prevent sinh from being used in remap-shape?

@mkeeter
Copy link
Member

mkeeter commented Feb 13, 2023

They aren't supported at all! You can find the list of operations here.

sinh is trying to call a Guile built-in function (rather than a libfive wrapper), which won't work in the context of remap-shape; that's why you're getting a wrong-type-arg error.

I don't remember the current state of #348 ; it was blocked for a while waiting for Eigen to release a new version, but it may be possible to rebase that branch now.

@d01010101
Copy link
Author

There are some functions which I find useful for asymptotes.

#348 says "mkeeter force-pushed the master branch" but the link does not seem to show anything related to hyperbolic functions.

@mkeeter
Copy link
Member

mkeeter commented Feb 13, 2023

The code is here: https://github.com/libfive/libfive/pull/348/files

You'll probably want to rebase this branch onto the master branch to bring it up to date; I can't offer detailed git support, but the internet is full of tutorials.

@d01010101
Copy link
Author

I have corrected the patch against the current master branch. However, as it turned out, it is not so trivial to configure a second ssh key for the same site so I do not know how to create a pull request or whatever.

I attach a diff -r -c2 for the moment. If it is not enough tell me.

libfive-hyperbolic.diff.gz

@d01010101
Copy link
Author

Any chance it gets incorporated? It is a second hyperbolic trig patch to libfive slowly becoming obsolete... I am sorry for the format, but given the triviality of the patch, maybe it is enough?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants