summaryrefslogtreecommitdiff
path: root/src/lib/math
AgeCommit message (Collapse)Author
2020-11-12Fix typos.Samanta Navarro
Typos found with codespell. Please keep in mind that this should have impact on actual code and must be carefully evaluated: src/core/or/lttng_circuit.inc - ctf_enum_value("CONTROLER", CIRCUIT_PURPOSE_CONTROLLER) + ctf_enum_value("CONTROLLER", CIRCUIT_PURPOSE_CONTROLLER)
2020-07-13Bug 31812: Change http URL's to httpsJeremyRand
2020-02-06prob_distr: use "clang-format off" to avoid wide lines for URLsNick Mathewson
2020-01-09Merge branch 'pre_formatter_cleanups_squashed'Nick Mathewson
2020-01-09Use new ENABLE/DISABLE_GCC_WARNINGNick Mathewson
This is an automated commit, generated by: perl -i -pe 'next if /define/; s/((?:ENABLE|DISABLE)_GCC_WARNING)\(([A-Za-z0-9_\-]+)\)/$1(\"-W$2\")/' src/*/*/*.[ch] src/*/*.[ch]
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-12-20Run "make autostyle"teor
2019-11-18Merge remote-tracking branch 'tor-github/pr/1517'teor
2019-11-16Revise struct names in examples in comments to end with _tNick Mathewson
2019-11-15Doxygen: rename all .dox files to end with .mdNick Mathewson
Using a standard ending here will let other tools that expect markdown understand our output here. This commit was automatically generated with: for fn in $(find src -name '*.dox'); do \ git mv "$fn" "${fn%.dox}.md"; \ done
2019-11-15Doxygen: remove /** and **/ from all .dox filesNick Mathewson
This is an automatically generated commit, made with: find src -name '*.dox' | \ xargs perl -i -ne 'print unless (m#^\s*/?\*\*/?\s*$#);'
2019-11-07Rename probability distribution names to end with "_t".Nick Mathewson
I needed to do this by hand, since we also use these for function names, variable names, macro expansion, and a little token pasting.
2019-11-07Make all our struct names end with "_t".Nick Mathewson
This is an automated commit, generated by this command: ./scripts/maint/rename_c_identifier.py \ address_ttl_s address_ttl_t \ aes_cnt_cipher aes_cnt_cipher_t \ authchallenge_data_s authchallenge_data_t \ authenticate_data_s authenticate_data_t \ cached_bw_event_s cached_bw_event_t \ cbuf cbuf_t \ cell_ewma_s cell_ewma_t \ certs_data_s certs_data_t \ channel_idmap_entry_s channel_idmap_entry_t \ channel_listener_s channel_listener_t \ channel_s channel_t \ channel_tls_s channel_tls_t \ circuit_build_times_s circuit_build_times_t \ circuit_muxinfo_s circuit_muxinfo_t \ circuitmux_policy_circ_data_s circuitmux_policy_circ_data_t \ circuitmux_policy_data_s circuitmux_policy_data_t \ circuitmux_policy_s circuitmux_policy_t \ circuitmux_s circuitmux_t \ coord coord_t \ cpuworker_job_u cpuworker_job_u_t \ cv_testinfo_s cv_testinfo_t \ ddmap_entry_s ddmap_entry_t \ dircollator_s dircollator_t \ dist_ops dist_ops_t \ ecdh_work_s ecdh_work_t \ ewma_policy_circ_data_s ewma_policy_circ_data_t \ ewma_policy_data_s ewma_policy_data_t \ fp_pair_map_entry_s fp_pair_map_entry_t \ fp_pair_map_s fp_pair_map_t \ guard_selection_s guard_selection_t \ mbw_cache_entry_s mbw_cache_entry_t \ outbuf_table_ent_s outbuf_table_ent_t \ queued_event_s queued_event_t \ replyqueue_s replyqueue_t \ rsa_work_s rsa_work_t \ sandbox_cfg_elem sandbox_cfg_elem_t \ scheduler_s scheduler_t \ smp_param smp_param_t \ socket_table_ent_s socket_table_ent_t \ state_s state_t \ threadpool_s threadpool_t \ timeout_cb timeout_cb_t \ tor_libevent_cfg tor_libevent_cfg_t \ tor_threadlocal_s tor_threadlocal_t \ url_table_ent_s url_table_ent_t \ worker_state_s worker_state_t \ workerthread_s workerthread_t \ workqueue_entry_s workqueue_entry_t
2019-11-04Doxygen: document the rest of the directories in lib.Nick Mathewson
(This copies documentation from doc/HACKING/design, and edits for concisensess and clarity.)
2019-11-04Doxygen: Avoid ambiguity in @dir directivesNick Mathewson
This commit was automatically generated with: find src -name '*.dox' |xargs perl -i -pe 's{\@dir ([^/])}{\@dir /$1};'
2019-11-04Add stub directory-level documentation for most source directoriesNick Mathewson
This includes app, core, feature, lib, and tools, but excludes ext, test, and trunnel. This was generated by the following shell script: cd src for dname in $(find lib core feature app tools -type d |grep -v \\.deps$); do keyword="$(echo "$dname" |sed -e "s/\//_/" )" target="${dname}/${keyword}.dox" echo "$target" cat <<EOF >"$target" /** @dir ${dname} @brief ${dname} **/ EOF git add "$target" done
2019-10-16Doxygen: Fix things that looked like links.Nick Mathewson
Doxygen thinks that saying #foo is linking to a "foo" anchor someplace.
2019-10-16Doxygen: fix unrecognized commands.Nick Mathewson
Doxygen seems to interpret anything starting with \ as a command, even when we don't mean it that way.
2019-09-26Run "make autostyle" with new "annotate_ifdef_directives"Nick Mathewson
2019-09-17Merge branch 'tor-github/pr/1323'George Kadianakis
2019-09-12Ticket 31687: fix for tor_isinf() as wellNick Mathewson
tor_isinf() was new in 0.4.0, and also needs to look at the same rules as clamp_double_to_i64()
2019-09-12Merge branch 'ticket31687_035' into ticket31687_040Nick Mathewson
2019-09-10fp.c: Suppress float-conversion warnings on FreeBSD.Nick Mathewson
We used to do this on Windows only, but it appears to affect multiple platforms when building with certain versions of GCC, and a common pattern for defining the floating-point classifier functions. Fixes part of 31687. I'm calling this a bugfux on 31687, when we started suppressing these warnings on Windows.
2019-06-05Run "make autostyle."Nick Mathewson
2019-05-02Add comments to include.am files to note where new sources goNick Mathewson
This mechanism isn't perfect, and sometimes it will guess wrong, but it will help our automation.
2019-04-11Remove an extraneous _ from __COVERITY__Nick Mathewson
We had a typo in this check, so that coverity wasn't taking the right path. Bug not in any released Tor.
2019-03-26prob-distr: Some more comments about the initializers.George Kadianakis
Based on patches and review comments by Riastradh and Catalyst. Co-authored-by: Taylor R Campbell <campbell+tor@mumble.net> Co-authored-by: Taylor Yu <catalyst@torproject.org>
2019-03-26prob-distr: Silence some coverity warnings.George Kadianakis
2019-03-22circpad/prob_distr: Use crypto_fast_rng() instead of the old RNG.George Kadianakis
2019-03-13prob_distr: Better document our public API.George Kadianakis
2019-03-13prob_distr: Implement type-safe downcasting functions.George Kadianakis
2019-01-16Bump copyright date to 2019Nick Mathewson
2019-01-16Bump copyright date to 2019.Nick Mathewson
2019-01-11Add some more type checking.Taylor R Campbell
NOTE: This commit breaks the build, because there was a mistake in an earlier change of exactly the sort that this is meant to detect! I'm leaving it broken for illustration.
2019-01-11Use the distribution abstraction as an abstraction.Taylor R Campbell
2019-01-11Move ceil call back into the geometric sampler.Taylor R Campbell
Test exactly what the geometric sampler returns, because that's what the downstream callers of it are going to use. While here, also assert that the geometric sampler returns a positive integer. (Our geometric distribution is the one suported on {1, 2, 3, ...} that returns the number of trials before the first success, not the one supported on {0, 1, 2, ...} that returns the number of failures before the first success.)
2019-01-10Rename crypto_rand_uint32() -> crypto_rand_u32()George Kadianakis
See https://github.com/torproject/tor/pull/624#discussion_r246453777
2019-01-02Implement and test probability distributions used by WTF-PAD.George Kadianakis
This project introduces the prob_distr.c subsystem which implements all the probability distributions that WTF-PAD needs. It also adds unittests for all of them. Code and tests courtesy of Riastradh. Co-authored-by: Taylor R Campbell <campbell+tor@mumble.net> Co-authored-by: Mike Perry <mikeperry-git@torproject.org>
2018-07-01File-level documentation for some of src/lib.Nick Mathewson
2018-06-28Move floating-point math functions into a new lib/mathNick Mathewson