FianchettoAD is a programming language that supports automatic differentiation (autodiff) out of the box. With FianchettoAD, you can easily compute derivatives of functions without having to implement differentiation manually.
The language is currently under development and is incomplete. If you would like to help completing it, feel free to make a pull request!
- Built-in Automatic Differentiation: Calculate derivatives of functions effortlessly.
- User-friendly Syntax: Similar to C/C++, making it easy to learn and use.
- Flexibility: Supports multi-line comments and various data types.
Here is a simple example to demonstrate the usage of FianchettoAD:
differentiable fn double square(double x) {
return x * x;
}
/*
This is a multiline comment
*/
let int foo;
fn int main() {
let double y = square(5.0);
let double dydx = square'(5.0); // Derivative of square at x = 5.0
if (dydx == 10.0) {
printf("Fianchetto AD is awesome!");
}
return 0;
}
FianchettoAD requires GNU Flex to be installed on your system. Below are the instructions for installing GNU Flex on different platforms:
sudo apt-get update
sudo apt-get install flexYou can install GNU Flex using Homebrew:
brew install flexYou can download it from the Official Releases and follow the installation instructions.
Once you have GNU Flex installed, you can build FianchettoAD by following these steps:
-
Create a build directory:
mkdir build
-
Navigate to the build directory:
cd build -
Generate the build files using CMake:
cmake -B ..
-
Build the project using
make:make
After building FianchettoAD, you can write your programs in .fc files and compile them using the FianchettoAD compiler.
We welcome contributions to FianchettoAD! If you have any bug reports, suggestions, or pull requests, please feel free to submit them on our GitHub repository.
FianchettoAD is licensed under the MIT License. See the LICENSE file for more details.
For any questions or support, please reach out to me at [baxidhairya2312@gmail.com].
Happy Coding with FianchettoAD!