-
Notifications
You must be signed in to change notification settings - Fork 26
[RFC]: Develop C implementations for Base Special math functions #113
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
Comments
Does this seem fine? |
@sahil20021008 Thank you for opening this RFC. A few comments/questions:
|
@kgryte , thanks for your review/feedback.
Please review when free and let me know if you have any further feedback for me. |
@kgryte |
Looks good. Thanks for sharing. |
Full name
Sahil Goyal
University status
No
University name
No response
University program
No response
Expected graduation
No response
Short biography
I have completed my BTech in Computer Science and Applied Mathematics from Indraprastha Institute of Information Technology Delhi, and I am currently working in Oracle.
I am proficient in Python, C, C++, Java, SQL, Perl, and have some experience in HTML, CSS, Javascript and Node
My work has been mostly in Python, SQL and Perl, along with Ui development on Oracle APEX. I have worked on automating the Bug filing process and migration of our APIs from Perl to Python.
I have also done research under Dr Arani Bhattacharya in college where I worked on FlexDisplay project that would alter Android source code in order to reduce mobile battery consumption by preventing rendering of unnecessary UI elements.
I am interested in Machine Learning, Artificial Intelligence, and Android Development.
I am also very interested to work on open source projects as I believe this would help me get introduced to Open Source Field, and it would also help me keep up-to-date with the latest industry standards and practices and let me have more hands on coding practice, and also learn about the latest technologies.
SahilGoyalResume 6.pdf
Timezone
Indian Standard Time ( IST ), UTC+05:30
Contact details
email:[email protected],github:sahil20021008
Platform
Windows
Editor
VSCode
This is because VSCode is an extremely lightweight and highly customizable editor. It allows us to use all kinds of extensions, which makes it highly versatile and helps maintain proper code quality
Additionally, it is widely used because of which if someone runs into a problem there are a lot of references online as someone else has usually faced the same problem before, and it has a huge online community.
Programming experience
I am proficient in different languages like Python, C, C++, SQL, Perl, Java, Javascript and Node. I also have experience with online website development through Oracle APEX, and have worked on making small website as part of my college project.
During second half of college, I participated in a research project under professor Dr. Arani Bhattacharya and Dr. Mukulika Maity to work on the FlexDisplay Project where we worked on altering the android source code in order to reduce mobile battery consumption by preventing the rendering of unnecessary UI elements. We published a short paper on it that I presented in PerCom 2024 conference in Biarritz, France.
m79317-goel paper.pdf
Fake News Detection: I have also worked on a machine learning project where we created a case study and compared the outputs based on different metrics for many different ML models to find out which one would be the best suited for the real life Liar Dataset.
BadaFone: Created a full stack web app for Database Management course. The frontend was created through HTML and CSS, while the backend used Python and MYSQL
I have also participated in contests such as Google Code Jam (Rank 3097) and Google Kickstart (Rank 8153 and 3702).
JavaScript experience
My most recent experience with JavaScript is contributing to stdlib repository and adding new packages.
Currently, the latest package i have been working on is adding is
stdlib/math/base/special/minmaxabsf
package which includes both JS and C implementations along with examples, benchmarks, tests, etc.One of the best thing about JavaScript is the many kinds of different frameworks and the rich open source community and support one can get for them, such as React, Node, etc.
Theres not anything I can think of in particular that is a problem in JavaScript. One thing I think that can still be improved in JavaScript is adding more support for Artificial Intelligence. This is because nowadays, Artificial Intelligence is extremely popular, and currently, JavaScript does not have support for it nearly as much as there should be
Node.js experience
I have some basic experience with Node.js, including setting up a development environment, using npm for package management, and building simpler server side aplications. I have also studied event-driven architecture, asynchronous programming and non blocking I/O through online courses and some hand on practice.
C/Fortran experience
I have learned C in college 2nd year for my Operating Systems course. I have worked on modifying the linux kernel and adding and removing syscalls, and I have also completed a Computer Networks course in college, where I used C to create sockets and pipes for communication between different processes and threads.
CN assignments
OS assignments
Additionally, I have also worked on the C implementation for the benchmarks, examples, and the src file which contains the C implementations of the minmaxabsf function. while contributing to stdlib library.
I also have a basic understanding of fortran
Interest in stdlib
I really loved the idea of stdlib when I found out about it. An entire mathematical open source library for JavaScript. This will really increase accessibility and effectiveness and improve the popularity and support of Javascript in the world.
Additionally, I really like how well organized the library is: from implementing a specific format for all merges, to linting checks, it is really impressive to adhere to coding conventions that much, and I really liked the thought and effort that went into it. It is also very well thought out hoow easy it has been made for new developers to contribute to the stdlib library, from adding a dev container to adding multiple tests, etc.
The thing I liked the most about stdlib library is that the functions being implemented are core functions that will be used everywhere. Even small and minor functions will be picked up quickly, and there wont be as much of a reliance on other languages for such features as there was before. Thanks to this library, the effectiveness of javascript will skyrocket and it will become much more widespread than it already is.
Version control
Yes
Contributions to stdlib
Currently, I have raised a Pull Request for adding the implementation of
stdlib/math/base/special/minmaxabsf
, as well as a pull request to fix the array indexing issue instdlib/math/base/special/gamma-lanczos-sum
where we were trying to iterate over a number instead of an array due to an incorrect import.This implementation includes C implementations, JavaScript implementation, tests, benchmarks (in both C, JS and Julia), examples, and docs.
This Pull Request is yet to be merged: stdlib-js/stdlib#6290
This Pull Request has been merged: stdlib-js/stdlib#6454
stdlib showcase
For showcase, I have created a scientific calculator. It can perform the basic calculations such as
+, -, *, ,
and also has additional functions such as%, ln, reciprocal, square, sqrt, e^x^
. It uses stdlibmath/base/special
functions for these calculations, and also has a feature where it can give the output in single-precision and double-precision floating point values according to the user's needs.Scientific Calculator
Goals
I plan to complete many implementations for the
stdlib/math/base/special
functions.The implementations will include implementations including complex numbers, single-precision and double-precision floating point numbers, etc.
This will greatly help JavaScript in the long run as it will be achieve a greater degree of self reliance compared to before, and wont have to rely on other languages such as Python for such features as it did in the past.
Moreover, I am also open to working on other packages such as the
constants/float32
andconstants/float64
package. This is because these are the base functionality packages, and adding single-precision implementations for these will have a huge impact on the implementation of the rest of the stdlib library, as these will be used everywhere and can help reduce a lot of hard work and effort in the future implementations and save a lot of developer hours.Why this project?
The proposed project excites me because it is an open source library and will be used by developers everywhere. It includes adding functionalities that will help people in mathematical operations, writing algorithms, etc. This library will be widely used and it is an amazing thing, and I would really love to be a part of such an amazing project.
This project is also about implementing mathematical functions in JavaScript and C, and as I graduated in Computer Science and Applied Mathematics and have experience in both Software Development and Mathematical Functions, I believe this projects suits me properly and I will be able to properly contribute to this project.
Additionally, this will help me improve my own abilities, get familiar with open source standards and coding practices, etc.
I am also very excited to work with a welcoming and large community like the stdlib community, and work together and contribute with my mentors.
Qualifications
I graduated from college in the field or Computer Science and Applied Mathematics. Thats why, I believe that I have good experience with both mathematics and in Computer Science. I have taken courses such as Statistical Inferencce, Probability and Statistics, Linear Algebra, etc., because of which I have a lot of experience with such mathematical functions.
This project will involve me working in C, JavaScript, Node.js.
During college, I have achieved a significant amount of experience in C, and I also have some experience with Javascript and Node.js.
Additionally, during my contribution to stdlib, I have also worked on C, JavaScript, Node, and Julia and I have gotten a large amount of experience with the respective technologies.
I have a good idea now for how a package should be implemented and what is required for the development and implementation of the various API's and utility functions.
Also, whatever I do not understand, I am more than willing to learn and I will do my absolute best to output high quality code quickly and efficiently. Even while I was making the current contributions to stdlib, whenever I would run into any problems, I would try to debug it on my own first, search online on various sites, and if that didnt work, I would turn to the stdlib community, which is very helpful, and would get the required help and guidance.
Prior art
The work on this project has already been started. Many functions in
math/base/special
have already been implemented, and others are already working on optimizing it even further and adding new implementations. 649. This is very helpful because it provides new developers a foundation to already build upon rather than having to build a new project from scratch.Commitment
As I currently have a full time job at Oracle,
I would like to work on the job as Part time: (175 Hours)
I plan to be give more than ~ 20 - 25 hrs/week during GSoC
I have no other commitments that would cause any issues with contributing to this project
Overall Plan
I have gone through the codebase and used the command
node ./lib/node_modules/@stdlib/_tools/pkgs/toposort/bin/cli $PWD/lib/node_modules/@stdlib/math/base
in order to perform a topological sort of the dep tree.I have found that the following functions are missing C implementations. I have listed them along with their order (line number) in the dep tree.
Additionally, I have also found the following packages that are missing implementations that I plan to implement (C, JS, benchmarks, examples, tests, docs, etc). These were not a part of the toposort output, so I still need to have an in-depth look at whether or not there are any pending dependencies. In that case, I will either move to resolve the dependency first, or in case there is an open PR already, I will implement another function.
Some functions will require consulting the appropriate reference implementations. I will identify implementations that are IEEE 754 compliant.
For functions that involve complex numbers, I will be referring to C99 implementation
These are some of the libraries that I will be considering:
I plan on finishing the implementations for all of these functions. Additionally, if I am able to finish the implementations for these functions before the end of GSoC period, I plan to pick up new functions for implementation.
Schedule
Assuming a 12 week schedule,
Community Bonding Period: During this period, I intend to implement functions that have not been implemented yet, or the C implementations for functions that already exist. Currently, I am planning to implement the following C implementations:
cabs2f, cceilf, cflipsignf, heavisidef, minn, minabsn
, and the complete implementations for following single precision functions:betaincinvf, betaincinvf, cceilnf
, over the 3 week Community Bonding Period.Week 1: I will be focusing on the C implementations of
minmaxn
and complete implementation ofrising-factorialf, roundsdf
functions. If any functions are pending from Community Bonding Period, I will also aim to complete them.Week 2: During this week, will be working on completion of C implementations of
minmaxabsn
and complete implementation ofsicif, exp10f
functions. Additionally, if there are any functions pending from previous weeks, I will also aim to complete them.Week 3: During this week, will be working on completion of C implementations of
minmaxabs
and complete implementation ofround2f, betaf
functions. Additionally, if there are any functions pending from previous weeks, I will also aim to complete them.Week 4: During this week, will be working on completion of C implementations of
minmax, maxn
and complete implementation ofcotdf
functions. Additionally, if there are any functions pending from previous weeks, I will also aim to complete them.Week 5: During this week, will be working on completion of C implementations of
maxabsn
and complete implementation ofsinf, truncbf
functions. Additionally, if there are any functions pending from previous weeks, I will also aim to complete them.Week 6: (midterm) During this week, will be working on completion of C implementations of
heaviside
and complete implementation oftanf, ceilnf
functions. Additionally, if there are any functions pending from previous weeks, I will also aim to complete them.Week 7: During this week, will be working on completion of C implementations of
bessily1
and complete implementation offactoriallnf, trunc2f
functions. Additionally, if there are any functions pending from previous weeks, I will also aim to complete them.Week 8: During this week, will be working on completion of C implementations of
bessily1
and complete implementation offactoriallnf, trunc2f
functions. Additionally, if there are any functions pending from previous weeks, I will also aim to complete them.Week 9: During this week, will be working on completion of C implementations of
sici, betainc
and complete implementation ofcscf, ceil2f
functions. Additionally, if there are any functions pending from previous weeks, I will also aim to complete them.Week 10: During this week, will be working on completion of C implementations of
betaincinv
and complete implementation oflog2f
functions. Additionally, if there are any functions pending from previous weeks, I will also aim to complete them.Week 11: Will complete any backlog from previous weeks. If there is no backlog will work on implementation of other packages. Will check if there are any additional packages with missing C implementations, or missing single/double precision implementations
Week 12: Will complete any backlog from previous weeks. If there is no backlog will work on implementation of other packages. Will check if there are any additional packages with missing C implementations, or missing single/double precision implementations
Final Week: Will be wrapping up any pending tasks or functions, and along with that, also will be working on any additional things if required by the mentors
Notes:
Related issues
No response
Checklist
[RFC]:
and succinctly describes your proposal.The text was updated successfully, but these errors were encountered: