Skip to content

Instantly share code, notes, and snippets.

View cswiercz's full-sized avatar

Chris Swierczewski cswiercz

View GitHub Profile
@cswiercz
cswiercz / out1
Created January 4, 2016 19:05
Differentials debugging output
=====================
=== Differentials ===
=====================
- singular point -
(0, 0, 1)
g:
x^4 + x^2*y^2 + (-2)*x^2*y - x*y^2 + y^2
P:
c_1_0*x + c_0_1*y + c_0_0
-integral basis-
Computing differential numerators...
=====================
=== DIFFERENTIALS ===
=====================
Singularities:
[((0, 0, 1), (2, 2, 1)), ((0, 1, 0), (2, 1, 2))]
@cswiercz
cswiercz / test.profile
Created January 7, 2016 22:27
Pure Sage Riemann Matrix Timings
Thu Jan 7 14:06:54 2016 test.profile
7206599 function calls (7193937 primitive calls) in 67.121 seconds
Ordered by: internal time
List reduced from 1682 to 20 due to restriction <20>
ncalls tottime percall cumtime percall filename:lineno(function)
107328 29.405 0.000 31.848 0.000 analytic_continuation_smale.py:44(newton)
321984 19.540 0.000 21.290 0.000 analytic_continuation_smale.py:79(smale_beta)
@cswiercz
cswiercz / integralbasis.profile
Created January 11, 2016 17:13
Pure-Sage Integral Basis timings
f = -y^8 + x^6 + 2*x^5
Fri Jan 8 11:53:49 2016 test.profile
10111400 function calls (10092038 primitive calls) in 18.657 seconds
Ordered by: internal time
List reduced from 1618 to 20 due to restriction <20>
ncalls tottime percall cumtime percall filename:lineno(function)
@cswiercz
cswiercz / timings1.out
Created January 25, 2016 00:17
Some Puiseux timings
TIMING
addition:
1 loops, best of 1: 399 µs per loop
1 loops, best of 1: 50.8 µs per loop
multiplication
1 loops, best of 1: 382 µs per loop
1 loops, best of 1: 49.1 µs per loop
exponentiation
1 loops, best of 1: 63.9 µs per loop
1 loops, best of 1: 52 µs per loop
@cswiercz
cswiercz / incorrect monodromy
Created February 18, 2016 18:28
Debugging the monodromy group of a genus 43 curve
(-0.8236030133558490? - 1.432315805459161?*I, [(4, 8)])
(-1.003926469820694? - 1.312699285291610?*I, [(7, 10)])
(-0.6292719323035824? - 1.527276805764545?*I, [(1, 2)])
(-1.167115733368246? - 1.170457245420270?*I, [(1, 5)])
(-0.4242938073167455? - 1.595984245201483?*I, [(3, 10)])
(-1.310334542487599? - 1.008018012406511?*I, [(0, 4)])
(-0.2122033047349114? - 1.637297596524009?*I, [(0, 9)])
(0.003353190880725522? - 1.650551001929049?*I, [(5, 6)])
(-1.431088452408990? - 0.8281670339311812?*I, [(6, 10)])
(0.2186811865807071? - 1.635561892212205?*I, [(4, 6)])
@cswiercz
cswiercz / genus6.sage
Created March 9, 2016 16:49
Klein and Frauendiener's Period Matrix
# from the curve f(x,y) = -180*x**5 + 396*y*x**4 - 307*x**3*y**2 + 107*x**2*y**3 = 273*x**3 - 318*x**2*y - 17*x*y**4 + 117*x*y**2 - 68*x + y**5 - 12*y**3 + 19*y = 0
#
# these a- and b-period matrices use a different normalization from that of my own
#
a6 = Matrix(CDF,
[
[0.041441136367794 + 0.027833200726691*I, -0.034538213432710 + 0.027188711893010*I, -0.097853547524326 + 0.026426118256733*I, -0.304059718474855 + 0.060306772513671*I, -0.536899366726663 + 0.087203183867874*I, -2.814882797646379 + 0.543317148745872*I],
[-0.114912806296197 - 0.044601420984340*I, 0.000000000000002 - 0.000000000000002*I, 0.053195632592273 - 0.022598899319034*I, 0.000000000000006 - 0.000000000000006*I, 0.242671354734388 + 0.009863612111086*I, 0.764112818309978 + 0.035735030643330*I],
[0.114912806296198 + 0.016851233729331*I, -0.000000000000003 + 0.054377423786101*I, -0.053195632592272 - 0.080539669725953*I, -0.000000000000009 + 0.120613545027839*I, -0.242671354734385 - 0.237235882811205*I, -0.764112818309973 - 0.538148249906231*I]
@cswiercz
cswiercz / CreatingExternalSagePackages.md
Last active June 7, 2018 00:34
A guide to creating a Sage package outside of Sage itself.
@cswiercz
cswiercz / KnightsAndKnaves.md
Created May 17, 2016 23:35
A problem from my Advanced Mathematical Logic final when I was an undergraduate.

On the island of Tautologos, all of the inhabitants are either knights, who always tell the truth, or knaves, who always lie. In addition, some of the knights are called “established knights” and some of the knaves are called “established knaves”. Now, the inhabitants of this island form various clubs. It is possible that an inhabitant may belong to more than one club. Given any inhabitant X and any club C, either X claims they are a member of C or they claim they’re not a member of C.

We are also given the following four facts:

  • E1: The set of all established knights forms a club.
  • E2: The set of all established knaves forms a club.
  • C (The Complementation Condition): Given any club C, the set of all inhabitants of the island who are not members of C form a club of their own, CBar.
  • G (The Godelian Condition): Given any club C, there is at least one inhabitant of the island who claim that they are a member of C. (Of course, this claim might be false: they could be a
@cswiercz
cswiercz / RaceConditionProblem.md
Last active June 8, 2016 16:20
A race condition problem and solution from the AMath 483/583 final examination I wrote this Spring.

Problem Statement

In the below OpenMP code, a shared memory location counter is being incremented by two threads, each thread incrementing counter 100 times. The incrementation process

counter += 1