similar to: Problems doing addition/subtraction with floats

Displaying 20 results from an estimated 130 matches similar to: "Problems doing addition/subtraction with floats"

2006 Jan 19
4
UserEngine - rake bootstrap aborted => undefined method `synchronize_with_controllers'' for Permission:Class
Good day all. I have successfully installed Engines and LoginEngine and LE is setup and running correctly. However, after installing and setting up UE, when attempting to run the rake bootstrap method I get the following error: undefined method `synchronize_with_controllers'' for Permission:Class My environment is Rails 1.0.0 Ruby 1.8.2 WinXP WebBRICK MySQL 4.1.14 I found the following
2007 Apr 19
5
Best practice thoughts: Model helpers, mocks
Hello! I''m pretty new to unit testing, and have only been using RSpec for a few weeks. I found that for my controller specs, my setup methods were getting very long building mocks/stubs for all the model objects I needed to work with. I''ve started creating helpers like the following for each of my models. The "min_" methods are short for "minimum", and
2006 Jun 20
3
WEBrick just decided to take a hiatus on me
Good day all. This is one of the most frustrating days I have had with Rails in quite some time now (almost 8 months actually). Yesterday I complete my development and testing and everything is peachy. I head home for the evening and do my things there. This morning, I come back in and do my typical morning routine of starting up eclipse and the usual "ruby script/server" command in
2006 Mar 01
9
ajax doesn''t show at the right place
Hi, I use link_to_remote to create a link to trigger an ajax, things work fine, a new rhtml is created, however, the newly created rhtml doesn''t replace my old zone, it shows instead on top of my old zone...Does someone know why??? my code is like <table> <tr><td colspan="2"><a href="#" onclick="new Ajax.Updater(''zone1'',
2006 Jun 23
0
Re:(RESOLVED, KIND OF) auto complete and after update element
Well, I did finally get the after_update_element to call my controller action with the following syntax: <%= text_field_with_auto_complete ( :customer, :company_name, { :size => "45" }, :after_update_element => "function(element,value){" + remote_function( :url => { :action => :get_customer_info }, :with =>
2011 Feb 01
1
[PATCH] libxl: fix unsafe subtraction in libxl_set_memory_target
The current libxl_set_memory_target function subtracts a negative amount from an uint32_t variable without checking if the operation wraps around. This patch fixes this bug (that I previously believed to be an hypervisor issue): http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1729 Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> diff -r a69965e61ae9
2002 Oct 31
1
Please Help. Subtraction of Matrices?
I am just beginning to learn R. Please help. I have two matrices. One 20 columns by 16 rows represent student responses on a 20 question test. The second is 20 by 16 representing the correct responses 16 times. Subtracting one from the other should yield 0's if a response is correct. Yet Response minus Bigkey doesn't work. Documents indicate vectors should add and subtract, and
2008 Oct 03
1
Simple addition and subtraction doesn't work??
I was working on a teaching example, but came across this weird result: > q<-c(1.6,2.6, -3.4) > q [1] 1.6 2.6 -3.4 > sum(q) [1] 0.8 > sum(q)- 0.8 [1] 2.22044605e-16 Why is the result not precisely zero? Thanks! AT
2009 Oct 25
2
row subtraction
I don't know if there is a way to do this in R but I want to subtract within the same column from different rows. I want to subtract c(r)-c(r-1) and continue down the column until they are all calculated and form another column. Again I don't know if R can do this but I thought I would ask. Thanks either way
2010 Jun 28
1
Subtraction loop
I have a data frame with 2 columns, one for day and one for average. The day starts at 97 all the way to 279. I want to subtract day 98 average- day 97 average, then day99 average -day 98 average and so on down my list, creating another column with the subtracted results. I have: Day DailyAverage 1 97 0.6076782 2 98 0.7121478 3 99 0.8059347 4 100 0.9545806 5
2012 Apr 20
1
vector subtraction
I would like to calculate vector from existing value e.g v <- 1000 s <- 30 d1 <- v-s d1 <- 970 d2 <- d1 -s d2 <- 940 d 3 <- d2-s d3 <- 910 : : d15 <- ..... so how I should get vector of length 15 d < - 970,940 , 910 , ....... -- View this message in context:
2002 Oct 31
0
Solved! Thanks! Please Help. Subtraction of Matrices?
G?ran Brostr?m <gb at stat.umu.se> responded to my call for help (Please Help. Subtraction of Matrices?), and has now supplied enough information that I should be able to solve my problem. My very great thanks to all who read and responded. --- Gene Barlow, Ft. Lauderdale, FL -------------- next part -------------- An HTML attachment was scrubbed... URL:
2024 Sep 11
2
[Bug 3732] New: An integer underflow may occur due to arithmetic operation (unsigned subtraction) between values '0' and '67108864', where the first value comes from the expression 'h4 + b' and the second value comes from the expression '(1 << 26)'
https://bugzilla.mindrot.org/show_bug.cgi?id=3732 Bug ID: 3732 Summary: An integer underflow may occur due to arithmetic operation (unsigned subtraction) between values '0' and '67108864', where the first value comes from the expression 'h4 + b' and the second value comes from
2010 Feb 10
2
simple subtraction in a single vector
OK, this is very elementary, but I need help. I have looked in Verzani, past postings etc. Problem: I need to subtract the "length" date between "h4" and "a3" #which would be 4-1 I would rather not convert the two columns into four columns (with headings being "a3","a4","c4","h4"). DF <- data.frame(length=c(1,2,3,4),
2012 Sep 24
4
serial subtraction within a vector
Hello, I have a vector (numeric) v-> c(a,b,c,d,e) and I want to create the vector n->c(b-a,c-b,d-c,e-d). How can I do that? Thank you Hermann [[alternative HTML version deleted]]
2007 Jan 26
2
strange behaviour with equality after simple subtraction
hello, today while trying to extract data from a list for subsequent analysis, i stumbled upon this funny behavior on my system: > x<-c(0.1,0.9) > 1-x[2] [1] 0.1 > x[1] [1] 0.1 > x[1]==1-x[2] [1] FALSE > x[1]>1-x[2] [1] TRUE > x<-c(0.3,0.7) > x[1] [1] 0.3 > x[2] [1] 0.7 > 1-x[2] [1] 0.3 > x[1]==1-x[2] [1] FALSE but: >
2010 Jun 17
1
Subtraction of group means using AGGREGATE and MERGE
Hi all, This is my first ever post, so forgive me and let me know if my etiquette is less than that required. I am searching for a faster way of subracting group means within a data frame than the solution I've found so far, using AGGREGATE and MERGE. I'll flesh my question out using a trivial example: I have a data frame Z with two columns - one X of values and one Y of labels: > Z
2017 Jan 25
2
Backend subtraction changed to negative addition
Hi all, I am writing a custom backend. Doing more testing i notice that for some reason something like: int test(int x) { return x - 1; } is being turned into this IR: ; Function Attrs: nounwind define i32 @test(i32 %n) #0 { entry: %n.addr = alloca i32, align 4 store i32 %n, i32* %n.addr, align 4 %0 = load i32* %n.addr, align 4 %sub = sub nsw i32 %0, 1 ret i32 %sub } But finally in
2002 Jan 16
4
faster vector subtraction??
hi is there a faster way to do this? i <- 1 for(x in vector1) for(y in vector2) { m[[i]] <- (x - y) i <- i + 1 } regards soren -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in
2017 May 16
2
[RFC] Canonicalization of unsigned subtraction with saturation
Hi, This message is a result of a discussion of backend optimization for sub(max) pattern(https://reviews.llvm.org/D25987), which can be either converted to unsigned min-max or unsigned saturation instruction(if the target supports it). Currently these versions of the code produce different IR(and we need to manage both types in backend): (1.16) void foo(unsigned short *p, unsigned short max,