This is our web site, it's here: objectionary.com
objectionary / eo-math Goto Github PK
View Code? Open in Web Editor NEWMath Objects for EO Programming Language
License: MIT License
Math Objects for EO Programming Language
License: MIT License
This is our web site, it's here: objectionary.com
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
org.junit.jupiter:junit-jupiter-params
, org.junit.jupiter:junit-jupiter-api
).github/workflows/codecov.yml
actions/checkout v4
actions/setup-java v4
actions/cache v3
codecov/codecov-action v4.0.0-beta.3
ubuntu 22.04
.github/workflows/mvn.yml
actions/checkout v4
actions/setup-java v4
actions/cache v3
.github/workflows/pdd.yml
actions/checkout v4
ubuntu 22.04
.github/workflows/xcop.yml
actions/checkout v4
ubuntu 22.04
pom.xml
com.jcabi:parent 0.66.0
org.eolang:eo-runtime 0.32.0
org.junit.jupiter:junit-jupiter-api 5.9.1
org.junit.jupiter:junit-jupiter-params 5.9.1
org.apache.maven.plugins:maven-compiler-plugin 3.8.1
org.eolang:eo-maven-plugin 0.32.0
com.qulice:qulice-maven-plugin 0.22.0
Now, random.pseudo
is using Java in order to get currentTimeMillis()
. It's possible to get rid of Java, after we enable gettimeofday
in eo-sys: objectionary/eo-sys#5
There is a separate function of sqrt in defferent languages. For instance Math.sqrt
in java. I think it would be useful to have this object too. We can use Heron's iterative formula instead of calculating method in number.power
because the formula has a good convergence rate:
@Graur @EugeneDar WDYT?
The puzzle 21-dd9dd514
from #21 has to be resolved:
eo-math/src/main/eo/org/eolang/math/number.eo
Lines 183 to 184 in e857216
The puzzle was created by maximtrunnikov on 19-Sep-22.
Estimate: 30 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
pom.xml isn't completed, need to add more info to it.
What if we introduce a new atom that calculates a series. So we could implement sin
, cos
and and othe trigonometric functions via Taylor series. It would take a value and formula for coefficient of nth term. For example we could implement exp(x) by this:
[x] > exp
calc-series > @
x
"1/n!"
We need to give coefficient of nth term somehow.
@Graur @EugeneDar @includealex what do you think?
The puzzle 89-b869de10
from #89 has to be resolved:
eo-math/src/main/eo/org/eolang/math/number.eo
Lines 338 to 341 in 5aef8d7
The puzzle was created by @levBagryansky on 24-Nov-22.
Estimate: 90 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
We need to add number.ceil
object according to this:
• ceil : round itself up
It seems we need more attractive readme
The puzzle 56-a1660657
from #56 has to be resolved:
eo-math/src/main/eo/org/eolang/math/number.eo
Lines 303 to 305 in a61f115
The puzzle was created by levBagryansky on 10-Nov-22.
Estimate: 90 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
According to this paper (p. 7 Digits) we need to add int8
, int16
, int32
and int128
objects, which are decorators of bytes with a predefined size. They implement the same numeric operations as int
.
The puzzle 53-64d5b423
from #53 has to be resolved:
eo-math/src/main/eo/org/eolang/math/number.eo
Lines 292 to 294 in 5a32e1a
The puzzle was created by @rultor on 07-Nov-22.
Estimate: 30 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
@Graur could you please take a look?
Failed to execute goal org.eolang:eo-maven-plugin:0.28.0:assemble (compile) on project eo-math: Execution compile of goal org.eolang:eo-maven-plugin:0.28.0:assemble failed: Tag 'master' doesn't exist or the list of all tags was not loaded correctly
Originally posted by @maxonfjvipon in #41 (comment)
I needed sqrt
attribute of number
, but it wasn't in release. There were implemented list of things, maybe we can make a release?
@Graur @maxonfjvipon
I think it would be convenient to use number.is-close
in order to comparison floats. I would simplify coding tests
WDYT about introducing this object?
[accuracy other] > close
According to this paper NaN
and angle
methods must meet float operations:
(number 0).is-int
must return TRUE
[] > is-int
if. > @
eq.
^
0
FALSE
eq.
div.
^
^
1
We need a positive-infinity
(1.0 / 0.0) and negative-infinity
(-1.0 / 0.0) EO objects here.
Is it possible to implement it?
The puzzle 56-447424ab
from #56 has to be resolved:
eo-math/src/main/eo/org/eolang/math/number.eo
Lines 295 to 297 in a61f115
The puzzle was created by @levBagryansky on 10-Nov-22.
Estimate: 90 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
Would be nice to introduce a new object series
, which would decorate an array. Then, we can have max
and min
:
max.
QQ.math.series
*
5
13
-9
Later, we can implement series.sum
, series.average
, series.expectancy
, etc.
We need to up version of jcabi
to 0.59.0
in pom. Similar to this.
The puzzle 56-3e56337e
from #56 has to be resolved:
eo-math/src/main/eo/org/eolang/math/number.eo
Lines 291 to 293 in a61f115
The puzzle was created by @levBagryansky on 10-Nov-22.
Estimate: 90 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
When I'm trying to merge some changes with rultor
, I've get an error.
Caused by: java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: EOorg/EOeolang/EOmath/EOnan$EOas_int$EO?.java
at sun.nio.fs.UnixPath.encode (UnixPath.java:145)
at sun.nio.fs.UnixPath.<init> (UnixPath.java:69)
at sun.nio.fs.UnixFileSystem.getPath (UnixFileSystem.java:279)
at java.nio.file.Path.resolve (Path.java:515)
at org.eolang.maven.Place.make (Place.java:61)
at org.eolang.maven.JavaFiles.saveJava (JavaFiles.java:96)
at org.eolang.maven.JavaFiles.save (JavaFiles.java:77)
at org.eolang.maven.TranspileMojo.exec (TranspileMojo.java:141)
at org.eolang.maven.SafeMojo.execute (SafeMojo.java:112)
I think rultor.yml
configuration merge is broken
It would be great if we could move objects from org.eolang.math
package of eo-runtime
(in EO) to this eo-math
project.
Since we get rid of them from float.eo
and int.eo
according to this. Here they are:
@maxonfjvipon You can leave them as is or redo them. It's up to you. But keep the tests untouched please.
I can provide some help with this issue, if you want.
The puzzle 93-b28a2be4
from #93 has to be resolved:
eo-math/src/test/eo/org/eolang/math/integral-tests.eo
Lines 71 to 75 in 4cceaf5
The puzzle was created by @rultor on 29-Nov-22.
Estimate: 30 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
@Graur @maxonfjvipon please check
The tests with number.log fails with stackoverfow
. Maybe we need to investigate this question.
fail case.
More cases are in #65
Let's use eo 0.25.5
The puzzle 35-8e3580f7
from #35 has to be resolved:
eo-math/src/main/eo/org/eolang/math/random.eo
Lines 67 to 69 in fe5ccbd
The puzzle was created by @levBagryansky on 01-Dec-22.
Estimate: 30 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
I've run the next command:
mvn clean package
Expected behaviour: eo-math
compiles successfully and all compiled files and classes are placed in target
folder.
Actual: I get the next exception during the build:
[ERROR] Failed to execute goal org.eolang:eo-maven-plugin:0.28.10:transpile (compile) on project eo-math: Execution compile of goal org.eolang:eo-maven-plugin:0.28.10:transpile failed: XPath '@check' not found in '<error line="32" severity="warning" sheet="not-emp..16..)' contains redundant parentheses</error>\uA': Index (0) is out of bounds (size=0) -> [Help 1]
We can now implement integrals using Simpson's rules:
or
@Graur what do you think about having integral
object in eo-math
?
Accordingly to IEEE 754 NaN should be a result of next operations:
0 / 0
∞ / ∞
0 * ∞
∞ + (-∞) = ∞ - ∞ = -∞ + ∞
sqrt(x)
if x < 0 (if EO will not support complex arithmetics)log(x)
and ln(x)
if x < 0 (if EO will not support complex arithmetics)powr(+-0, +-0)
(powr(x, y)
is pow(x, y)
, but x ∈ [0,+∞] when in pow(x, y)
x ∈ [-∞, +∞])The puzzle 53-f25515fd
from #53 has to be resolved:
eo-math/src/main/eo/org/eolang/math/number.eo
Lines 355 to 356 in 5a32e1a
The puzzle was created by @rultor on 07-Nov-22.
Estimate: 30 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
The puzzle 56-d42fb220
from #56 has to be resolved:
eo-math/src/main/eo/org/eolang/math/number.eo
Lines 299 to 301 in a61f115
The puzzle was created by levBagryansky on 10-Nov-22.
Estimate: 90 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
Let's implement them in EO, instead of Java
It seems we need to be able to convert an angle
to radians too
After the changes introduced in EO 0.28.0, one of the tests fail here:
EOorg.EOeolang.EOmath.EOmod_into_while_and_seq_objectsTest.testWorks() Time elapsed: 0.024 sec <<< FAILURE!
org.opentest4j.AssertionFailedError:
Expected: <5> equal to value
but: was <false>
at org.junit.jupiter.api.AssertionUtils.fail(AssertionUtils.java:39)
at org.junit.jupiter.api.Assertions.fail(Assertions.java:117)
at EOorg.EOeolang.EOmath.EOmod_into_while_and_seq_objectsTest.testWorks(EOmod_into_while_and_seq_objectsTest.java:170)
Please, upgrade and release new version of eo-math.
We need to:
eo-math
.eo
files from eo-math
to objectionary/home
project (by .sh
script)after #25
For creating new objects, for instance, arccos
using binary search is needed. I think, that it would be helpful to have such an object as binary-search
:
[localization-area precision given-value foo-to-use] > binary-search
Where
precision
is an accuracy with what you want to count resultgiven-value
is a value you want to count. For instance, arccos 0.6
here 0.6
is a given valuelocalization-area
is an area where we are searching for function meaning. If we take arccos
as an example, localization area
would be foo-to-use
is a function we use to count out and compare with precision
The puzzle 42-658d578c
from #42 has to be resolved:
eo-math/src/test/eo/org/eolang/math/number-tests.eo
Lines 317 to 320 in 74d9163
The puzzle was created by @Graur on 01-Sep-22.
Estimate: 30 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
Metas must be sorted alphabetically according to EO policy.
Blocks: objectionary/eo#846
Let's get rid of the atom and implement number.power
in EO
The JAR file we produce doesn't include .class
files written here, but does include .class
files generated from auto-generated Java files. It should be the other way around.
The puzzle 21-9a1034f5
from #21 has to be resolved:
eo-math/src/main/eo/org/eolang/math/number.eo
Lines 186 to 188 in e857216
The puzzle was created by maximtrunnikov on 19-Sep-22.
Estimate: 30 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
The puzzle 36-165baf3b
from #36 has to be resolved:
eo-math/src/main/eo/org/eolang/math/series.eo
Lines 34 to 35 in 01866b2
The puzzle was created by @yegor256 on 24-Sep-22.
Estimate: 30 minutes, role: DEV.
If you have any technical questions, don't ask me, submit new tickets instead. The task will be "done" when the problem is fixed and the text of the puzzle is removed from the source code. Here is more about PDD and about me.
I want to use mod
object in my program:
+alias org.eolang.txt.sprintf
+alias org.eolang.io.stdout
+alias org.eolang.txt.text
+alias org.eolang.math.number
[args...] > main
[y] > leap
or. > @
and.
eq. (mod. y 4) 0
not. (eq. (mod. y 100) 0)
eq. (mod. y 400) 0
stdout > @
sprintf
"%d is %sa leap year!"
(text (args.at 0)).as-int > year!
if. (leap year:y) "" "not "
but I get this error. What could be wrong?
[ERROR] [main:4] The alias "org.eolang.math.number" is not used (unused-aliases:27)
We need to increase stack size up to 256 mb
Compiling eo-runtime
the following error occurs:
[WARNING] [org.eolang.math.number:24] Meta is out of order: "alias org.eolang.math.negative-infinity" (unsorted-metas:13)
Build fails due to failOnWarning
enabled in eo-runtime
.
The warning needs to be fixed in number.eo
.
Also the same flag needs to be enabled in eo-math
I think that we should have an opportunity to count arccos of some value. It can help in implementation Chebyshev Polynomials. For instance, we will have an ability to count them like
@Graur what do you think? Do we need object acos
in eo-math
or it would be better to avoid having it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.