search for: fmin

Displaying 20 results from an estimated 57 matches for "fmin".

Did you mean: fman
2014 Aug 13
5
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
Hi, I’d like to re-propose adding intrinsics for fmin / fmax. These can be used to implement the equivalent libm functions as defined in C99 and OpenCL, which R600 and AArch64 at least have instructions with the same semantics. This is not equivalent to a simple fcmp + select due to its handling of NaNs. This has been proposed before, but never...
2014 Aug 14
2
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
...uld still be left unspecified as they're optional in IEEE-754). > > - Steve > > Sent from my iPhone > >> On Aug 13, 2014, at 7:38 PM, Matt Arsenault <arsenm2 at gmail.com> wrote: >> >> Hi, >> >> I’d like to re-propose adding intrinsics for fmin / fmax. These can be used to implement the equivalent libm functions as defined in C99 and OpenCL, which R600 and AArch64 at least have instructions with the same semantics. This is not equivalent to a simple fcmp + select due to its handling of NaNs. >> >> This has been proposed...
2014 Aug 18
2
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
...nhofer.de/> > > From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Stephen Canon > Sent: Thursday, August 14, 2014 18:03 > To: Matt Arsenault > Cc: llvm-commits; LLVM Developers Mailing List > Subject: Re: [LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics > > … actually, now that I’m able double-check this, I’m quite surprised to find that we didn’t define fmax(+0,–0) in IEEE–754, which says [paraphrased]: > > minNum(x,y) is x if x < y, y if y < x, and the number if one is a number and the other...
2014 Aug 18
3
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
...e can easily be expanded into IR, and does not have the wide hardware support (particularly in GPUs) that the IEEE version does. —Owen > On Aug 18, 2014, at 12:00 PM, Carter Schonwald <carter.schonwald at gmail.com> wrote: > > would it be in scope to have intrinsics analogues for fmin/fmax that return Nan if either arg is a nan? > Julia Lang and GHC Haskell are both likely to change their definitions of min/max on floats/doubles to return nan if either arg is Nan. > See here  <https://github.com/JuliaLang/julia/issues/7866> for t...
1999 Dec 07
0
Minimize function of several variables?
Hi, Is there something like the Matlab function FMINS in any R packages? Here is the help file of fmins in case something similar exist under R with a different name. Thanks in advance. Yves Gauvreau *********************** function [x, options] = fmins(funfcn,x,options,grad,varargin) %FMINS Minimize function of several variables. % X = FMINS(...
2018 Jul 23
2
RFC: What is the real behavior for the minnum/maxnum intrinsics?
...e are two problems. First the expected behavior for signaling NaNs needs to be clarified. Second, whether the returned value is expected to be canonicalized (as if by llvm.canonicalize). Currently according to the LangRef: Follows the IEEE-754 semantics for minNum, which also match for libm's fmin. If either operand is a NaN, returns the other non-NaN operand. Returns NaN only if both operands are NaN. If the operands compare equal, returns a value that compares equal to both operands. This means that fmin(+/-0.0, +/-0.0) could return either -0.0 or 0.0. This first line is a lie. T...
2014 Sep 17
4
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
...l. I could even be convinced if we wanted to add a pair of NaN-propagating intrinsics as well, for targets and languages that want those semantics, even if I disagree with them. I do think that, if we are using the minnum/maxnum names, we should explicitly note that they are equivalent to C’s fmin/fmax, but not std::min/std::max or Java(script)’s min/max. > > —Owen > > >> On Sep 15, 2014, at 12:26 PM, Dan Gohman <dan433584 at gmail.com> wrote: >> >> Given IEEE-754's sway, and its saying what it does on this point, but given also the pop...
2014 Sep 15
2
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
Given IEEE-754's sway, and its saying what it does on this point, but given also the popularity of NaN-propagating min and max, how about a compromise? We add intrinsics following the IEEE-754 semantics, but we also follow IEEE-754 (and ARMv8) in renaming them to minnum and maxnum, to clarify which interpretation these intrinsics are using. -------------- next part -------------- An HTML
2014 Sep 12
2
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
> On Sep 12, 2014, at 10:27 AM, Dan Gohman <dan433584 at gmail.com> wrote: > > > More generally, I don’t see a compelling reason for LLVM to add intrinsic support for the version you’re proposing. Your choice can easily be expanded into IR, and does not have the wide hardware support (particularly in GPUs) that the IEEE version does. > > The IEEE version can also be
2014 Sep 13
2
[LLVMdev] [PATCH][RFC]: Add fmin/fmax intrinsics
...ion that it's a popular flag. > Also, as a practical issues, many GPUs have ISA-level support for the > IEEE-conforming version. Some (all?) of the AMD GPUs that Matt cares about > support it, and PTX has native operations for it as well. The IR expansion > of an IEEE-conforming fmin/fmax is at least three compares + selects, which > makes it very difficult to pattern match for these targets. > It's 2 compares + selects: float nan_swallowing_fmin(float a, float b) { return b != b ? a : (a < b ? a : b); } which is within the realm of pattern-matching. &gt...
2018 Jul 26
3
RFC: What is the real behavior for the minnum/maxnum intrinsics?
...gnaling NaNs needs to be clarified. Second, whether the >> returned value is expected to be canonicalized (as if by llvm.canonicalize). >> >> Currently according to the LangRef: >> >> Follows the IEEE-754 semantics for minNum, which also match for libm's >> fmin. >> >> If either operand is a NaN, returns the other non-NaN operand. Returns >> NaN only if both operands are NaN. If the operands compare equal, >> returns a value that compares equal to both operands. This means that >> fmin(+/-0.0, +/-0.0) could return eit...
2018 Apr 17
2
iterative read - write
...;")* *# create and calculate a new variable for time between call pusles * *Corbre_2 [c("TBC")] <- recode.variables(Corbre_2[c("TBC")] , "0 -> NA;")* *# Create new BW variable for band width then change data file name* *BW<-within(Corbre_2,BW<-Fmax-Fmin)* *# Create 2 new variables for fundamental H1 and third harmonic H3 frequencies * *#based on Fc that is generally loudest at the 2^nd harmonic.* *BW<-within(BW,FcH1<-Fc*.5)* *BW<-within(BW,FcH3<-FcH1*3)* *#rename to a DF to calculate the stats * *BatStats<-BW* *BatStats<-...
2012 Dec 05
6
[LLVMdev] max/min intrinsics
...were recognized rather than looking for compare-select sequences. The suggestion was to change compare-selects into max and min intrinsic calls during instcombine. The intrinsics to add are: declare iN llvm.{smin,smax}.iN(iN %a, iN %b) declare iN llvm.{umin,umax}.iN(iN %a, iN %b) declare fN llvm.{fmin,fmax}.fN(fN %a, fN %b) What does the community think? Paul
2012 Oct 28
0
lbfgsb from C
...uot;result=%.2f\n", result); return result; } void grad(int n, double *par, double *gr, void *ex) { gr[0] = 2*par[0]; gr[1] = 2*par[1]; } int main(void) { int n = 2; int m = 5; double init[] = {2,3}; double lower[] = {-100, -100}; double upper[] = {100, 100}; int nbd[] = {0, 0}; double Fmin; int fail; void *ex = 0; double factr = 1e7; double pgtol = 0; int fncount; int grcount; int maxit = 10; char msg[1000]; int trace = 0; int nREPORT = 10; /* from http://cran.r-project.org/doc/manuals/R-exts.html#Optimization void lbfgsb(int n, int lmm, double...
2002 Jul 22
1
"New" problem with polr (or optim, or ...)
..., and because the beetles haven't read Cochran and Cox, the design is messy, with all sorts of confounding. Now, when I run the analysis I get this: > ModelF <- polr(Ext ~ Habitat+Edge+Grids+SE+NH+Size+Wings+Grids:SE + Grids:NH + Habitat:Edge , na.action=na.omit) Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess) : non-finite value supplied by optim Which is presumably because the data is unbalanced. This would be (sort-of) OK, except that this particular model is the optimal one I found when I ran it last time, using a previous version of R (and...
2000 Apr 24
1
compiling R-1.0.1 under Solaris
...---------------------------------------------------------------------------- ---- ... make[3]: Entering directory `/home/ppp/paradis/R/R-1.0.1/src/appl' cr libappl.a Rsock.o S_compat.o approx.o bakslv.o binning.o chisqsim.o chull.o c poly.o cumsum.o distance.o fft.o fmin.o fortran.o lbfgsb.o loglin.o lowess.o mac har.o massdist.o pretty.o pythag.o rowsum.o sock.o splines.o stem.o strsignif.o tabulate.o uncmin.o zeroin.o ch2inv.o chol.o dpbfa.o dpbsl.o dpoco.o dpodi.o dpo fa.o dposl.o dqrdc.o dqrdc2.o dqrls.o dqrsl.o dqrutl.o dsvdc.o dtrco.o dtrsl.o e igen.o lminfl....
2012 Dec 17
0
[LLVMdev] max/min intrinsics
Maybe we can have two versions of the intrinsic function, "ordered" and "unordered", just like fcmp has [1]. Would that work ? [1] - http://llvm.org/docs/LangRef.html#fcmp-instruction On Dec 17, 2012, at 11:14 AM, "Schoedel, Kevin P" <kevin.p.schoedel at intel.com> wrote: > At Monday, December 17, 2012 2:05 PM, Nadav Rotem [mailto:nrotem
2006 Mar 14
1
Ordered logistic regression in R vs in SAS
I tried the following ordered logistic regression in R: mod1 <- polr(altitude~sp + wind_dir + wind_speed + hr, data=altioot) But when I asked The summary of my regression I got the folloing error message: > summary (mod1) Re-fitting to get Hessian Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) : the initial value of 'vmin' is not finished. I decided to try it in SAS with the following program: PROC LOGISTIC DATA=altioot; CLASS sp wind_dir ; title "mod1"; output out=mod1; MODEL altitude = sp wind_dir wind_...
2012 Dec 17
3
[LLVMdev] max/min intrinsics
At Monday, December 17, 2012 2:05 PM, Nadav Rotem [mailto:nrotem at apple.com] wrote: >This part worries me. The new min/max intrinsics will only be useful if we could pattern match cmp/select into them. Yes, that's the obvious alternative. I don't think we have any strong opinion either way, and fcmp/select is certainly easier to implement. -- Kevin Schoedel, Software
2005 Mar 22
1
error with polr()
...2 2.50515 18 1 1 0 3.2e+02 2.50515 19 2 1 1 1.0e+03 3.00000 20 2 1 1 1.0e+03 3.00000 When I try, > polr(y~lx,data=ord.dat) I gives me a output, which is the same as that from SAS. But when I try, > summary(polr(y~lx,data=ord.dat)) Re-fitting to get Hessian Error in optim(start, fmin, gmin, method = "BFGS", hessian = Hess, ...) : initial value in vmmin is not finite And the weird thing is that it's fine if I use "x" instead of "lx", where lx=log10(x). thanks Sincerely, cahn