Skip to main content

rsr45-dual-autodiff-x

rsr45-dual-autodiff-x is optimised using Cython for improved performance.


Features

  • Dual Number Arithmetic: Supports basic operations like addition, subtraction, multiplication, and division.
  • Mathematical Functions: Includes trigonometric, exponential, logarithmic, and other common mathematical functions.
  • Automatic Differentiation: Computes derivatives automatically as a natural part of the computation.
  • Cython Optimization: Improved performance for computationally intensive tasks.

Installation

Using pip

Install the package directly from PyPI:

pip install rsr45-dual-autodiff-x

Using github

  1. Clone the repository
git clone https://gitlab.developers.cam.ac.uk/phy/data-intensive-science-mphil/assessments/c1_coursework1/rsr45.git
cd dual_autodiff
pip install -r requirements.txt
cd dual_autodiff_x
pip install e .

Usage

Importing the Package

import dual_autodiff_x as df_x
from dual_autodiff_x.dual import Dual as DualOptimised
from dual_autodiff_x.functions import sin as sin_optimised, cos as cos_optimised, log as log_optimised

Using dual_autodiff_x (Optimised Version)

x_optimised = DualOptimised(2, 1)  # Represents the dual number 2 + 1ε

Performing Operations

Using dual_autodiff_x (Optimised Version)

# Example: f(x) = log(sin(x)) + x^2 * cos(x)
f_x_optimised = log_optimised(sin_optimised(x_optimised)) + x_optimised**2 * cos_optimised(x_optimised)
print(f_x_optimised)  # Output the result and its derivative

Why Use dual_autodiff_x?

The rsr-dual-autodiff-x package is an optimized version of dual_autodiff, built with Cython for better performance. Use it when speed is a priority, especially for computationally intensive tasks.


Licence

This project is licensed under the MIT License.

Metadata

Release files for rsr45-dual-autodiff-x 0.1.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rsr45-dual-autodiff-x 0.1.17
File Size Uploaded Provenance Actions
rsr45_dual_autodiff_x-0.1.17.tar.gz 88.9 kB Without provenance Details for rsr45_dual_autodiff_x-0.1.17.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rsr45-dual-autodiff-x 0.1.17
File Interpreter ABI Platform Actions
rsr45_dual_autodiff_x-0.1.17-cp312-cp312-macosx_10_15_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.15+ x86-64 Details for rsr45_dual_autodiff_x-0.1.17-cp312-cp312-macosx_10_15_x86_64.whl

Total release size: 174.9 kB

Release files / rsr45_dual_autodiff_x-0.1.17.tar.gz

Download URL rsr45_dual_autodiff_x-0.1.17.tar.gz
Size 88.9 kB
Tags Source
SHA-256 checksum
How to use checksums
798a31d8be99d4a99f773500f92666bd66ebe75d1e9ef3ba36c9005ae0b8daf2
BLAKE2b-256 checksum
How to use checksums
f4a616c99074854a0a7cad2ff29ad707fb9d8ad897a3751bea13b022340ac229
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Release files / rsr45_dual_autodiff_x-0.1.17-cp312-cp312-macosx_10_15_x86_64.whl

Download URL rsr45_dual_autodiff_x-0.1.17-cp312-cp312-macosx_10_15_x86_64.whl
Size 86.1 kB
Tags CPython 3.12 macOS 10.15+ x86-64
SHA-256 checksum
How to use checksums
0699643e4e8bd5bbf45203bcd5f332c7f4f5bf67e769dda1281e92bd01fdcb40
BLAKE2b-256 checksum
How to use checksums
e53c0b38bf7f13fd297b47b51cbb37cb36336528a98791956847cbd314a41148
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.7

Security for rsr45-dual-autodiff-x 0.1.17

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page