# Java distance node feature request : more math functions

**URL:** <https://forum.knime.com/t/java-distance-node-feature-request-more-math-functions/8143>\
**Category:** KNIME Analytics Platform\
**Created:** [June 18, 2015, 10:04am UTC](https://forum.knime.com/t/java-distance-node-feature-request-more-math-functions/8143 "2015-06-18T10:04:13Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![biancio](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/b/ed655f/32.png) [@biancio](https://forum.knime.com/u/biancio)\
**Post date:** [June 18, 2015, 10:04am UTC](https://forum.knime.com/t/java-distance-node-feature-request-more-math-functions/8143/1 "2015-06-18T10:04:13Z")

</div>

Hello,

I have been working on the clustering of protein conformations using Ramachandran angles.

The Java distance node would have been the perfect tool to work with that set ; unfortunately there is only a selected set of math functions available in this node (only abs, max, mean, pow, sqr, sqrt).

In my case, trigonometric functions were needed, but probably most, if not all the mathematical functions available inthe math formula node would be of interest in this java distance node.

&nbsp;

Best,

&nbsp;

Marc

---

<div class="post-metadata">

**Author:** ![Iris](https://forum-cdn.knime.com/user_avatar/forum.knime.com/iris/32/14_2.png) [@Iris](https://forum.knime.com/u/Iris)\
**Post date:** [July 3, 2015, 10:36am UTC](https://forum.knime.com/t/java-distance-node-feature-request-more-math-functions/8143/2 "2015-07-03T10:36:49Z")

</div>

Hi Marc,

I put this feature request into our tracking system and will let you know as soon as there is some progress.

Thank you for letting us know :-)

Iris

---

<div class="post-metadata">

**Author:** ![DiaAzul](https://forum-cdn.knime.com/user_avatar/forum.knime.com/diaazul/32/48297_2.png) [@DiaAzul](https://forum.knime.com/u/DiaAzul)\
**Post date:** [June 10, 2022, 4:52pm UTC](https://forum.knime.com/t/java-distance-node-feature-request-more-math-functions/8143/3 "2022-06-10T16:52:01Z")

</div>

This feature request was raised seven years ago, but doesn’t appear to have been implemented.

I need trig functions in the Java distance node as my work uses spherical co-ordinates on an n-sphere. It is a bit frustrating not to have the opportunity to extend the Java functions available in nodes beyond those that the developer decides are useful - how can a developer know what will be useful or not? Better to leave it for the user to have access to the full Java libraries.

Is there any chance this might get implemented? If not I will need to use something not Knime to do my work.

---

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [June 10, 2022, 7:49pm UTC](https://forum.knime.com/t/java-distance-node-feature-request-more-math-functions/8143/4 "2022-06-10T19:49:11Z")

</div>

@DiaAzul have you tried to include such libraries in the Java snippet nodes?

> [@Split multiple page PDF to individual pages](https://forum.knime.com/t/split-multiple-page-pdf-to-individual-pages/43734/9):
>
> Hi @srinibash1980 , I’m pleased it worked for you and thank you for marking the solution as that will help others find it. Attached is an updated version demonstrating processing of all pdf files in a folder. It uses a loop and with each iteration adjusts the config of the pdf component using flow variables. For demo here, I used the file name for each pdf as the basis for creating a new output folder, so the extracted pages for each file go into their own output folder. Obviously you can do t…

> [@Import class from external jar into a java snippet](https://forum.knime.com/t/import-class-from-external-jar-into-a-java-snippet/6052/4):
>
> No issues here. I'm attaching an example using the Apache Commons Math lib, but I've recently used different libraries as well without problems. My usual steps: Add the Java Snippet node to the workflow Open configuration Go to "Additional Libraries", add the jar file (in case you want the workflow to be portable, add the JAR file into the workflow and specify a "KNIME URL") Go to "Java Snippet" tab,&nbsp;import the classes in the "Your custom import" section, e.g. write&nbsp;"import org.apache.com…

---

<div class="post-metadata">

**Author:** ![DiaAzul](https://forum-cdn.knime.com/user_avatar/forum.knime.com/diaazul/32/48297_2.png) [@DiaAzul](https://forum.knime.com/u/DiaAzul)\
**Post date:** [June 10, 2022, 8:40pm UTC](https://forum.knime.com/t/java-distance-node-feature-request-more-math-functions/8143/5 "2022-06-10T20:40:34Z")

</div>

Thanks for the suggestion.

The Java Distance node works in a different way - more like the maths and string expression nodes with pre-defined functions…unless I am missing something. The title of the node is slightly misleading as it implies correlation with the Java Snippet nodes when, in reality, it is less Java and more expression node related.

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [June 23, 2023, 8:25pm UTC](https://forum.knime.com/t/java-distance-node-feature-request-more-math-functions/8143/6 "2023-06-23T20:25:46Z")

</div>


