Skip to content

feat: Support all java.lang.Math in the query language#6110

Merged
chipkent merged 51 commits intodeephaven:mainfrom
chipkent:java_lang_math
Oct 29, 2024
Merged

feat: Support all java.lang.Math in the query language#6110
chipkent merged 51 commits intodeephaven:mainfrom
chipkent:java_lang_math

Conversation

@chipkent
Copy link
Copy Markdown
Member

Newly supported methods and constants:

  • addExact
  • atan2
  • cbrt
  • copySign
  • cosh
  • decrementExact
  • expm1
  • floorDiv
  • floorMod
  • getExponent
  • hypot
  • IEEEremainder
  • incrementExact
  • log10
  • log1p
  • multiplyExact
  • negateExact
  • nextAfter
  • nextDown
  • nextUp
  • scalb
  • sinh
  • subtractExact
  • tanh
  • toDegrees
  • toRadians
  • toIntExact
  • toShortExact
  • toByteExact
  • ulp
  • E (constant)
  • PI (constant)

Resolves #5995.

//////////////////////////// Constants ////////////////////////////

/**
* The double value that is closer than any other to e, the base of the natural logarithms.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit but I think this is a tad didactic. How about just "The mathematical constant e, the base of the natural logarithm".

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs are based off of the java.lang.Math wording.

static public final double E = Math.E;

/**
* The double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also a nit, but likewise a tad didactic in my opinion. How about just "The mathematical constant pi".

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docs are based off of the java.lang.Math wording.

@chipkent chipkent changed the title Support all java.lang.Math in the query language feat: Support all java.lang.Math in the query language Oct 23, 2024
kosak
kosak previously approved these changes Oct 29, 2024
@chipkent chipkent enabled auto-merge (squash) October 29, 2024 15:00
@chipkent chipkent merged commit 09eeedb into deephaven:main Oct 29, 2024
@chipkent chipkent deleted the java_lang_math branch October 29, 2024 18:18
@deephaven-internal
Copy link
Copy Markdown
Contributor

Labels indicate documentation is required. Issues for documentation have been opened:

Community: deephaven/deephaven-docs-community#345

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support all java.lang.Math in the query language

3 participants