Wikipedia:Reference desk/Archives/Computing/2015 April 24

= April 24 =

sound card
hi all, which card could be better for a sennheisers hd518... an asus xonar dgx or a Sound Blaster Audigy Fx, most part for music

thank you in advance

Does Jenkins run all tests on each commit?
Does Jenkins run all tests on each commit like Travis CI? WinterWall (talk) 06:12, 24 April 2015 (UTC)

Where can I host one or two documents?
I would like to put my CV on-line and link to it from Facebook etc. I don't really want to pay for hosting and I don't have a website anymore. What are my options? Hayttom 11:00, 24 April 2015 (UTC)
 * LinkedIn -- Mr. Prophet (talk) 11:39, 24 April 2015 (UTC)
 * Dropbox. WegianWarrior (talk) 13:02, 24 April 2015 (UTC)


 * Wow, I already use Dropbox; it hadn't occurred to me that I could point links to a document there. Thanks. Hayttom 13:22, 24 April 2015 (UTC)
 * I used Google Sites to create a web page for my career portfolio. --  Gadget850talk 14:04, 24 April 2015 (UTC)

In a sequence diagram, how do you show a subset of non-adjacent participants engage in an abstracted use case?
In a sequence diagram involving a number of participants (e.g. A, ..., E), how do you show a non-adjacent subset of them (e.g. A, C, & E) engaging in a sub-usecase, which is shown as an abstract block? The goal is to show that A, C, & E are participants, but B & D are not. In this simple example, we can reorder the participants to make A, C, & E to make them adjacent, but that is generally not possible when you have several such abstract blocks involving different subsets of participants. Is there a standard way of identifying the participants of an abstract sub-usecase? What are the common practices? --134.242.92.2 (talk) 18:10, 24 April 2015 (UTC)


 * I can't find an example at present, but I've seen this handled by making e.g. A,C,E one color, while B,D are a different color. Another option is to make the nodes different shapes, e.g. squares vs. circles. Just make sure you include a key/legend, and you should be able to clearly point out sub-groupings without using adjacency. SemanticMantis (talk) 18:24, 24 April 2015 (UTC)

Statistics : Gaussian bell curve/Normal distribution/Probability density function in pure ANSI C or C++
While studying density function of normal distribution I got the need to create a program for my embedded device which can solve integrates of : $$f(x) = \frac{1}{\sigma \sqrt{2\pi} } e^{ -\frac{(x-\mu)^2}{2\sigma^2} }$$ for solving probabilities in this form : and it’s reverts like finding $$a$$ in $$\mathbb{P}\left( 20 - a \le X \le 20+ a \right) = 0.95$$ or in $$\mathbb{P}\left( X < a \right) = 0.98$$ with $$\mathbb{N}\left(20;5\right)$$

The problem is solving integrates without using primitives is currently beyond of my knowledge and I won’t be able to use standard normal distribution tables the day I will have to solve those simple situations. 2A02:8420:508D:CC00:56E6:FCFF:FEDB:2BBA (talk) 19:32, 24 April 2015 (UTC)


 * The Cumulative distribution function of the Normal distribution does not exist as an elementary function. For convenience, we define the normal CDF in terms of "erf" - There will be many options available, but I would start by considering Error_function. SemanticMantis (talk) 21:07, 24 April 2015 (UTC)


 * erf and erfc = 1 − erf are available in math.h (or cmath). See C mathematical functions. -- BenRG (talk) 23:34, 24 April 2015 (UTC)
 * BenRG erfc is complementary function of erf not it’s reverse. And erf/erfl is not present in ANSI C. It is an addition which come with C99. I don’t have a C99 compatible compiler for embedded device. Also I am unable to find a long double version of an erfinv implementation and I don’t have the knowledge to create them. 2A02:8420:508D:CC00:56E6:FCFF:FEDB:2BBA (talk) 12:24, 25 April 2015 (UTC)
 * Sorry, I thought they were at least in C++98, but I didn't check. And I missed that you need the inverse.
 * Boost.Math has erf(c) and erf(c)_inv, with an arbitrary-precision implementation and optimized versions for 80-bit and (for erf only) 128-bit floats, and it's probably sufficiently portable. It's a large dependency, of course. You might be able to extract the relevant bits from boost/math/special_functions/erf.hpp and boost/math/special_functions/detail/erf_inv.hpp.
 * You could of course solve the inverse problem by successive approximation, using at worst one call of erf per mantissa bit plus a few to find the exponent. -- BenRG (talk) 19:25, 25 April 2015 (UTC)
 * BenRG Also my device doesn’t feature a return key on it’s keyboard, that's why I would prefer to use C if possible. Boost seems to rely partially on the UNIX/POSIX API which I can’t use.
 * I am unable to see how I can use an hypothetical erfinvl function for finding the minimal value $$a$$ in this kind of inequality $$\mathbb{P}\left( X > a \right) < 0.028$$ 2A02:8420:508D:CC00:56E6:FCFF:FEDB:2BBA (talk) 21:29, 25 April 2015 (UTC)
 * That equation is solved by the quantile function, which is given in normal distribution in terms of $$\operatorname{erf}^{-1}$$. (What is the relevance of a return key?  It certainly doesn't favor C over C++.  If you need newlines, and you have a compiler on the device (since otherwise its keyboard wouldn't matter), you could always write a version of tr first to translate your code&hellip;)  --Tardis (talk) 13:51, 28 April 2015 (UTC)
 * Are you looking for a highly precise solution, or just a rough one? Does it matter if the solution is computationally efficient (e.g. will you be iterating this thousands of times), or do you just need it to run occasionally?  It is fairly easy to implement crude solutions to this problem that will be accurate to several decimal places but not necessarily exact, but whether that is good enough probably depends on your application.  Dragons flight (talk) 19:45, 25 April 2015 (UTC)
 * Dragons flight Answering your question I don’t need something fast. The device itself is already using FPU emulation, and the code generation is optimized for size over speed. Crude/Slow solutions are perfectly acceptable.
 * The final precision accuracy does matter for the first six digits. As there are several intermediate steps, I guess higher internal precision is necessary. 2A02:8420:508D:CC00:56E6:FCFF:FEDB:2BBA (talk) 21:29, 25 April 2015 (UTC)
 * For example Error function gives approximation for erf and erfinv in basic functions that are everywhere accurate to three decimal places. As suggested above a Taylor series can give you even better accuracy but will generally require more terms.  Dragons flight (talk) 19:58, 25 April 2015 (UTC)
 * I guess I'm still a little confused. It looks like OP wants to implement something to evaluate certain expressions and inequalities, but can't use many established packages due to system constraints? Error_function looks better than the Taylor series approach, and could in principle be implemented from first principles using only arithmetic. If OP can't see how that link will help solve the example problems, someone can probably explain that too- but it's more a question of math than computers at that point. SemanticMantis (talk) 14:47, 26 April 2015 (UTC)
 * SemanticMantis building for my system is like building for an MS-DOS 5.0 PC with an intel 80286 with a broken return key. (I’m using a NEC V30MX with an old ROM-DOS version and special built-in keyboard) 2A02:8420:508D:CC00:56E6:FCFF:FEDB:2BBA (talk) 17:57, 26 April 2015 (UTC)
 * I've used that kind of system, but never had to compile code on it. Do you not have access to operations that can accomplish this?
 * $$\operatorname{erf}(x)\approx \frac{2 }{\sqrt{\pi}}\sgn(x)\sqrt{1-e^{-x^2}}\left(\frac{\sqrt{\pi }}{2}+\frac{31}{200}\,e^{-x^2}-\frac{341}{8000}\,e^{-2\,x^2}\right). $$
 * If you can code that, you can get a reasonably accurate and fast approximation to erf, which will then let you compute the kinds of things that you describe above. In other words, if you can manage to define/implement the right hand side above, then you won't need to depend on a built-in function to integrate Gaussian PDFs/normal distributions. Does that help? If you cannot implement that, can you tell us why not, or what operations you can't perform? (ok, and since I'm trying to help, mind telling us what the bigger goal is here? :) SemanticMantis (talk) 19:08, 26 April 2015 (UTC)
 * SemanticMantis What is sgn? Again, the thing I can acess the ANSI C standard library with. I don’t know what is sgn, the remaining looks OK. 2A02:8420:508D:CC00:56E6:FCFF:FEDB:2BBA (talk) 21:09, 26 April 2015 (UTC)
 * sgn is the sign function, which is simply -1, 0, or 1 depending on whether x is negative, zero, or positive respectively. It's probably not part of a standard library but it is trivial to implement with a few conditional statements.  Dragons flight (talk) 21:49, 26 April 2015 (UTC)
 * In fact, the compiler I’m using is Borland C++ 4.5.2 which can be downloaded here. 2A02:8420:508D:CC00:56E6:FCFF:FEDB:2BBA (talk) 00:09, 27 April 2015 (UTC)
 * Be careful:  (as do 341/8000 and 0.000000000000000000000e+0L; why not just write "0" in the last case?).  --Tardis (talk) 13:51, 28 April 2015 (UTC)
 * To clarify, I didn't write that code - someone else must have decided it was better to place their suggestion in with my comment. My understanding is that the OP has some math problems/questions along with the "computer" problems - the example I gave is just one way of getting an elementary expression to approximate erf, other expressions could be derived that use more summands and have coefficients that aren't so close to zero. SemanticMantis (talk) 14:03, 28 April 2015 (UTC)
 * This is the reverse, I have some computer problems along maths problems. The aim of the program is to replace the standard normal tables which I might no be allowed to use. 2A02:8420:508D:CC00:56E6:FCFF:FEDB:2BBA (talk) 00:03, 29 April 2015 (UTC)


 * Dragons flight Ok now it lacks the reverse error function which can be approximated as : $$\operatorname{erf}^{-1}(x)\approx \sgn(x) \sqrt{\sqrt{\left(\frac{2}{\pi a}+\frac{\ln(1-x^2)}{2}\right)^2 - \frac{\ln(1-x^2)}{a}}

-\left(\frac{2}{\pi a}+\frac{\ln(1-x^2)}{2}\right)}$$. The problem is I don't understand what does $$a$$ correspond to. Also, the code I posted outputs completely wrong results. 46.218.124.194 (talk) 09:51, 27 April 2015 (UTC)