{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Equation Numbering Test\n", "\n", "Inline math: $a^2 + b^2 = c^2$.\n", "\n", "Displayed equations below should be numbered automatically by the Gitea renderer.\n", "\n", "$$\n", "\\int_0^1 x^2 \\, dx = \\frac{1}{3}\n", "$$\n", "\n", "$$\n", "f(x) = x^2 + 1\n", "$$\n" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "integral x^2 on [0, 1] = 0.333333\\n", "sample values: [1.0, 1.0625, 1.25, 1.5625, 2.0]\\n" ] } ], "source": [ "def integral_x2(a=0.0, b=1.0):\n", " return (b ** 3 - a ** 3) / 3.0\n", "\n", "values = [x * x + 1 for x in [0.0, 0.25, 0.5, 0.75, 1.0]]\n", "print(f'integral x^2 on [0, 1] = {integral_x2():.6f}')\n", "print(f'sample values: {values}')\n" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "name": "python", "version": "3.12.0" } }, "nbformat": 4, "nbformat_minor": 5 }